Jump to content
Software FX Community

Displaying Additional Data for a Point


User (Legacy)

Recommended Posts

Rather than use a tooltip, I want to display additional data for points on a

scatter plot when a user clicks that point. This additional data resides in

a recordset. Points are passed as an array based on a TYPE Structure to a

function that displays the chart. This structure is :

Public Type CFXPoints

RecordNo As Long

X As Variant 'has to be variant because it could hold

dates/strings

Y As Double

Symbol As Long

Colour As Long

End Type

Data is derived from a recordset (not all records are used) and used to

populate an array based on this structure. The recordset is also passed to

the Function that displays the chart. This recordset contains additional

fields which will be displayed in a form when a data point is clicked on the

chart.

How can I map to the original data from the point when a user clicks the

point. What I need is the Series number and point for the click point.

Anyone know how to get it?

So far I have the following code :

Private Sub ChartFX1_LButtonUp(ByVal X As Integer, ByVal Y As Integer, nRes

As Integer)

Dim intHit As CfxHitTest

intHit = ChartFX1.HitTest(X, Y, ChartFX1.NSeries, ChartFX1.NValues)

If intHit = HIT_POINT Then

'user has hit a point, so need to desplay something

MsgBox ("Point Selected")

End If

End Sub

This tells me when a point is clicked, but I need to know series and point

number.

Thanks

Paul

Link to comment
Share on other sites

Thanks

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:LF2iaIMuCHA.2868@webserver1.softwarefx.com...

> In the LButtonDown event, you can call the HitTest method to retrieve the

> index of the Series and Point that was clicked, you can then use this

index

> to retrieve your custom data.

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...