SciChart WPF 2D Charts > DataSeries API > The Extreme Resamplers API
The Extreme Resamplers API

In response to a number of support requests regarding accuracy of Resampler Algorithms in SciChart when the data includes NaN, our team has developed a new set of C++ resampling algorithms. These are built into SciChart v5 and must be enabled to take advantage of them.

The performance of these resamplers is equivalent to that of SciChart WPF's default c# unsafe code resamplers, however they provide far higher accuracy in some cases. This API is recommended if:

  • You are using FIFO Series (Extreme Resamplers perform in-place resampling avoiding an expensive memory-copy when using FIFO charts)
  • You have NaN gaps in your series
  • You have unevenly spaced data in your time-series.
  • You want to adjust the resolution of resampling to avoid jagged lines in the resampled series output.

To Enable the Extreme Resamplers

Set the attached property PerformanceHelper.ExtremeResamplersProperty to TRUE on the SciChartSurface.

Adjusting Resampling Resolution

This new set of resampers also allow for changing of the precision of resampling. By default, SciChart outputs two points per pixel on the screen for time-series when downsampling data. You can change this to be 4, 8 or more for higher resolution charts.

Set the property BaseRenderableSeries.ResamplingPrecision to adjust this precision, according to the following rule.

  • 0 (default value) is the default precision
  • 1 means double precision
  • 2 means quad precision and so on

Have a look closely at the image above to see the difference. Notice that the edges of the chart when ResamplingPrecision=0 are jagged? The same edges are smooth when ResamplingPrecision is 1, 2, or 3.

NOTE: Higher Precision results in more points after the resampling step and will increase visual accuracy at the expense of some performance.