Jump to content
Software FX Community

More info on using CPI_PIXELTOMARKER?


User (Legacy)

Recommended Posts

Just wondering if anyone has been successful in using PIXELTOMARKER with

PaintInfo in clientside javascript? I want to use the LButtonDown event to

popup a div tag with information that concerns a datapoint that has been

clicked on. The LButtonDblClk passes you the Series and Point values, but

the LButtonDown does not.

Anyway, I thought that I would use the CPI_PIXELTOMARKER constant with

PaintInfo, but I can't get it to work. I checked the abismal online support,

but it doesn't give me any helpful info.

Thanks in advance,

T. Phalp

Link to comment
Share on other sites

Instead of PixelToValue (or PixelToMarker) you will need to use the

PaintInfo method as follows (vbscript)

// CHART_ML creates a long (32bits) value based in two short (16bits) values

Function CHART_ML (wLow, wHi)

CHART_ML = CLng(&H10000 * wHi) + wLow

End Function

// CHART_HIWORD returns the high (16bits) short from a long (32bits) value

Function CHART_HIWORD (l)

CHART_HIWORD = CInt((l And &HFFFF0000) / &H10000)

End Function

// CHART_LOWORD returns the low (16bits) short from a long (32bits) value

Function CHART_LOWORD (l)

l2 = l And &HFFFF&

If (l2 > 32767) Then

l2 = l2 - 65536

End If

CHART_LOWORD = CInt(l2)

End Function

sub Chart_LButtonDown(x, y, nRes)

// Currentaxis property allows you to get the X-Axis value

// 5 indicates CPI_PixelToValue

Chart.currentaxis = 2

xValue = Chart.PaintInfo(5, CHART_ML(x, y))

// Currentaxis property allows you to get the Y-Axis value

// 5 indicates CPI_PixelToValue

Chart.currentaxis = 0

yValue = Chart.PaintInfo(5, CHART_ML(x, y))

MsgBox(CStr(xValue)+","+CStr(yValue))

// 2 indicates CPI_PixelToMarker

nMarker = Chart.PaintInfo(2, CHART_ML(x, y))

MsgBox(CStr(CHART_LOWORD(nMarker))+","+CStr(CHART_HIWORD(nMarker)))

end sub

--

Regards,

JC

Software FX Support

"No Name" <spam@spam.com> wrote in message

news:3KZKl6rsCHA.3108@webserver1.softwarefx.com...

> Just wondering if anyone has been successful in using PIXELTOMARKER with

> PaintInfo in clientside javascript? I want to use the LButtonDown event to

> popup a div tag with information that concerns a datapoint that has been

> clicked on. The LButtonDblClk passes you the Series and Point values, but

> the LButtonDown does not.

>

> Anyway, I thought that I would use the CPI_PIXELTOMARKER constant with

> PaintInfo, but I can't get it to work. I checked the abismal online

support,

> but it doesn't give me any helpful info.

>

> Thanks in advance,

>

> T. Phalp

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...