In our view model, the data range is expanded to include data outside of the X-Axis range. This is done to preserve the spline curve which is defined by previous points– doing this prevents the spline curve from changing drastically by including X number of points outside the range.
When the Draw function is called, the point context that was bound in is filtered to the X Axis range which leads to the spline curve changing as you pan (especially noticeable if it affects a peak).
How can I change this behavior to preserve the spline line?
Updated — Setting ResampleMode = None does not give me all the points.
- Riley Huddleston asked 7 years ago
- last edited 7 years ago
-
NOTE: We are using a CustomRenderableSeries that implements either linear or spline depending on some factors.
- You must login to post comments
Points are pre-filtered by the given axis viewport. This is related to the resampling the chart does. The resampling can by disabled by using the ResamplingMode property on the series.
When using ResamplingMode.None, the draw function is provided with all the data — So you must do your own filtering of the viewport.
- Riley Huddleston answered 7 years ago
-
Setting the Series ResamplingMode to None doesn’t give me all the data. Any ideas?
-
It seems that using the ResamplingMode doesn’t change the PointSeries viewport. But instead I just look at the DataSeries instead. So I simply left ResamplingMode untouched and switch between PointSeries when zoomed out sufficiently and DataSeries when zoomed in sufficiently.
- You must login to post comments
Hi Riley,
I will also post my answer here.
We are doing optimization so PointSeries in a moment of Drawing can have not exact amount of dataPoints.
So in case you need all DataPoints to calculate precise spline in SplineLineRenderableSeries you should pass DataSeries as inputPointSeries parameter in ComputeSplineSeries method while drawing (meaning in Draw method of RenderableSeries).
Hope it will be useful
Best regards
Markiyan
WPF Developer
- Markiyan Kravchuk answered 7 years ago
- last edited 7 years ago
- You must login to post comments
Please login first to submit.