Jump to content
Software FX Community

Re: Display coordinates when mouseover series

User (Legacy)

Recommended Posts


I've done it with the following:

Turn on the object's ability to track the mouse:

Private Sub Form_Load()

Me.ChartFX1.TypeMask = Me.ChartFX1.TypeMask Or CT_TRACKMOUSE

End Sub

then store the value in the ControlTipText using the LButtonDown event of the object:

Private Sub ChartFX1_LButtonDown(ByVal x As Integer, ByVal y As Integer, nRes As Integer)

Dim dblX As Double

Dim dbly As Double

Me.ChartFX1.PixelToValue x, y, dblX, dbly, AXIS_Y

Me.ChartFX1.ControlTipText = "x: " & Format(dblX, "##.##") & " y: " & Format(dbly, "##.##")

End Sub

So when you position the mouse and left click the x,y value is stuffed into the ControlTipText.


Steve Schreiner (VBLogic, Inc.) <steve@vblogic.com> wrote in message news:6WQN7rfSAHA.1428@sfxserver.softwarefx.com...

> Is there a way to display the current coordinates of a point on a series

> line when a user holds his mouse over the line? By default, the corrdinates

> of the closest actual plotted point is shown.



Link to comment
Share on other sites


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

  • Create New...