Under review

Render a part of a series.

fuc2wi 4 years ago in API • updated by justSomeone 3 years ago 2

I'm using OxyPlot 2014.1.546.0 in a WPF project. I've 10 stairstep series with each ~11000 Points.
To increase performance I want to render only every nth point depending of the zoom?
Eg: Render every 10th point if I see the whole x-Axis and render every 5th point if I see the half of the x-Axis, and so on?

Thanks for your help in advance.
Best regards
Under review
The StairStep series has not been profiled for such big datasets yet. Can it be solved in a similar way as we do in `LineSeries`? Please create an issue at GitHub and create a small example that shows the problem!

Hi I have had the same problem and would like it to be solved.

But for a workaround of this problem i just took the line series and put another point

of the same y value on the x value where the next point should be displayed.

Thus i created my own stairstep series out of a line series.

In code this means :

// value and time are double [ ]

for (int i = 1; i < time.Length - 1; i++)
if (value[i] != value[i + 1])
series.Points.Add(new DataPoint(time[i], value[i])); //set the point into the series
if (time[i + 1] != null) // if the series has more points
series.Points.Add(new DataPoint(time[i + 1], value[i])); // add the same y value to the pos of i+1