Jump to content
Software FX Community

More info on using CPI_PIXELTOMARKER?


User (Legacy)
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...