I have several samplelineseries (line only, no points) with several million points on the chart.
I'd like to show any kind of indicator when my mouse goes over a trace point (or nearest point, i'm not very picky there). Here is how our old graphing package looked:
I know in the example application its sets points=true (or in some cases puts annotations on every single point). Both of those will cause memory usage to spike and immediately get an OutOfMemoryException.
I think the best bet is to handle the mouse-over event, and manually put something there at that point. Maybe an annotation, which is just a dot or something? What do you recommend?
Thanks!
ViewXY w\ SampleLineSeries, mouse-over 'track point'
Moderator: Queue Moderators
-
- Posts: 183
- Joined: Tue Mar 18, 2014 2:55 pm
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: ViewXY w\ SampleLineSeries, mouse-over 'track point'
SampleDataSeries has SolveNearestSampleByCoord method. In chart.MouseMove event handler, use that, and place a SeriesEventMarker or Annotation on the location of the solved point.
This is one approach
This is one approach
LightningChart Support Team, PT
-
- Posts: 183
- Joined: Tue Mar 18, 2014 2:55 pm
Re: ViewXY w\ SampleLineSeries, mouse-over 'track point'
Thanks, I'll give the series event markers a try today
-
- Posts: 183
- Joined: Tue Mar 18, 2014 2:55 pm
Re: ViewXY w\ SampleLineSeries, mouse-over 'track point'
This method works very well, but I have a followup.
I have code in my mousemove, and foreach series (3 series, for example), I find the closest point to my cursor, and plop an event marker there.
I would liek to know the X\Y coordinate of the point that I found. I only want to show an event marker if there is one found within some distance (20px) of the mouse cursor.;
Is there a way to convert an X\Y value or samplenumber to XY screen coordinates?
Thanks!
I have code in my mousemove, and foreach series (3 series, for example), I find the closest point to my cursor, and plop an event marker there.
I would liek to know the X\Y coordinate of the point that I found. I only want to show an event marker if there is one found within some distance (20px) of the mouse cursor.;
Is there a way to convert an X\Y value or samplenumber to XY screen coordinates?
Thanks!
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: ViewXY w\ SampleLineSeries, mouse-over 'track point'
You can do that with xAxis.ValueToCoord and yAxis.ValueToCoord method.
LightningChart Support Team, PT