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.
Lost points using pointseries when using the mouse wheel
Moderator: Queue Moderators
-
- Posts: 12
- Joined: Thu Feb 28, 2019 1:57 am
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: Lost points using pointseries when using the mouse wheel
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.
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.
-
- Posts: 12
- Joined: Thu Feb 28, 2019 1:57 am
Re: Lost points using pointseries when using the mouse wheel
Thank you, It works well.