WPF Charting – New Rendering Mode (v19.1, experimental)

We analyzed several performance issues in real-time charting scenarios and we found that the rendering speed of the Line Series was worse than expected in certain cases. Specifically, we noticed a big performance decrease when rendering a Line Series that contained many vertical segments. We investigated this behavior and developed a deeper understanding of the origin of the issues: in a nutshell, the WPF rendering system can be inefficient at times.

We decided to implement a custom rendering method to improve performance in the relevant use cases. The new implementation uses a D3DImage object to display a Direct3D surface. We write Direct2D content to that surface.

The new functionality is included in the upcoming v19.1 release. You enable it by setting the property ChartControl.IsDirectXSurfaceRendering to true. In our tests, Line Series rendering speed increased between 1.8 and 5 times in different scenarios, and in extreme cases the rendering speed was about 25 times faster than before. The Spline Series rendering speed improved as well, up to 2.5 times.

Note that series types other than Line and Spline don’t benefit from the new feature. At this point we recommend to activate the IsDirectXSurfaceRendering option only for Line and Spline series, since we haven’t fully ascertained compatibility with all other series types.

Performance Comparison

We created a sample with 20000 input points. Using the old rendering mode, the Line Series rendered around 5 FPS. At High DPI resolutions, the speed even dropped to 1 FPS. All interactive operations, such as zooming and scrolling, were slowed down considerably.

Running the same sample with the IsDirectXSurfaceRendering option enabled, we saw an impressive boost to around 50 FPS – even at High DPI resolutions. At the same time, scroll and zoom operations remained very smooth.

Performance Comparison

In the screenshot, the bottom chart also displays a Spline Series. This uses 800 points and shows an improvement from ~8 to ~45 FPS.

You can download the sample project from our GitHub repository

Your Feedback Is Valuable

If you use Line or Spline series in your data visualization applications, we suggest you try the new rendering method and let us know how it works for you. In case you notice any problems, please contact us via the Support Center. We would also appreciate it if you could take a moment to complete the short survey below.

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
David Isaza
David Isaza

Will this feature also improve the SwiftPlot used for real time data? Unfortunately we had to purchase other tools for this type of traces since we were having to much issues with performance using this control.

26 April 2019
Alex (DevExpress Support)
Alex (DevExpress)

Hi David,

While the ChartControl for WPF does not have a "Swift Plot" Series view type, the Line Series having a big number of vertical segments will definitely be rendered faster, including the scenarios when the chart's data is updated at realtime. If the resulting performance is still lower than expected, please contact us in the Support Center (www.devexpress.com/.../Center) and upload your sample project for further examination.

We will check whether extra optimizations can be applied.

26 April 2019

Please login or register to post comments.