Page 1 of 1

Lost points using pointseries when using the mouse wheel

Posted: Sat Mar 02, 2019 3:14 pm
by coldsun1982
Hi,
I used PointLineSeries to add new point periodly, but the early points lost when I zoomed out and zoomed in using the mouse wheel.
How to solve it, I want to record all points.
1.png
1.png (78.83 KiB) Viewed 15732 times
2.png
2.png (77.76 KiB) Viewed 15732 times

Re: Lost points using pointseries when using the mouse wheel

Posted: Mon Mar 04, 2019 10:43 am
by ArctionKestutis
Hello,

There are things which could affect line rendering after Zoom-in/out operation. The one you see in our Demo’s “Temperature graph” example is due to optimization to save memory. It is _chart.ViewXY.DropOldSeriesData property. Together with ScrollModePointsKeepLevel property (for PointLineSeries, SampleDataSeries, HighLowSeries and AreaSeries) they control how many pages of data are kept before cutting it from X axis minimum. One page = X min ... X Max. The ScrollModePointsKeepLevel 10 = means one page; 20 = two pages; 1 = 0.1 pages etc. In other words, if your range moved far away from initial minimum, points will be deleted. If you don’t want any point/data being deleted, just keep _chart.ViewXY.DropOldSeriesData disabled.

Another possibility for the missing line/points is breaking the assumption for data continuity for LineSeries. In particular, as User’s Manual describes, PointLineSeries and HighLowSeries require that for points in those series X values must be in progressive order: Points [i+1].X ≥ Points.X.

Hope this helps.

Re: Lost points using pointseries when using the mouse wheel

Posted: Mon Mar 04, 2019 1:55 pm
by coldsun1982
Thank you, It works well.