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

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.

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.


  • Create New...