Performance improvement with DateTimeAxis

Aug 17, 2012 at 1:36 PM
Edited Aug 17, 2012 at 1:36 PM


In your wiki page for performance, you mention that the slowest performance is when we set ItemsSource and use the data field properties.

However, this is what is done in the DateTimeDemo (Examples.WPF.WpfExample.DateTimeDemo). I followed this tutorial to have 300k points with DateTimeAxis in the bottom and a LinearAxis on the left. The chart is slow to respond to mouse events (click/zoom/resize window, etc.).

Any way to optimize this? How can I use IDataPoint or Mapping (the first three recommendations in the performance page) when my X-axis data is of type DateTime?



Aug 18, 2012 at 2:07 AM

Ah..I figured it out. Now I do this:

mySeries.Points.Add(new DataPoint(DateTimeAxis.ToDouble(myDateTime),myValue))

However, plot response is slow for 300k points. Any suggestions?


Aug 21, 2012 at 12:18 PM

If you use a ScatterSeries, you can increase the "BinSize" property - but this will make a less accurate plot... 

You should also run a performance profiler to see if the bottleneck is in your code, oxyplot or wpf.