Jump to content
Software FX Community



Recommended Posts


i want to paint a CustomCrosshair which Y-Value is always marking the appropiate Y Value of current X Value (the crosshait is always in the graph)

i have this code in MouseMove :

      if (chart.Data.Compacted)       {                 int point = (int)Math.Round(chart.AxisX.PixelToValue(e.X) * chart.Data.CompactedBy);         if(point < 0)           return;         VertMarker.Value = chart.Data[0, point];         HorzMaker.Value = point;       }       else       {         int point = (int)Math.Round(chart.AxisX.PixelToValue(e.X));         if (point < 0)           return;         VertMarker.Value = chart.Data[0, point];         HorzMaker.Value = point;       }


I got 2 problems:

If data is compacted, the crosshair of course isnt in par with graph, as i access the data array. So is there a way to get the actual displayed Y Value?

The other problem is similar. Even when the data is not compacted, the cross isnt in place but hoovers smometimes beside the graph.


Link to comment
Share on other sites

  • 9 months later...

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...