Performance improvement with DateTimeAxis

Oystein Bjorke 4 years ago 0
This discussion was imported from CodePlex

kidproquo wrote at 2012-08-17 14:36:

Hi,

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?

Regards,

Kid


kidproquo wrote at 2012-08-18 03:07:

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?

 


objo wrote at 2012-08-21 13:18:

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.

CodePlex