lundi 23 février 2015

c# winforms chart - scrolling large data issue

I am using MS chart controls to visualize big amount of data - ECG signal with approx 1 million of points. But there is a scrollbar and the actual visible area is about 5 000 points, so the majority of them are hidden outside the chart area.


When I load 10-20k of points, it repaints fast enough when scrolling. But with 1 million of hidden points scrolling becomes very laggy.


How can I plot very long signal on the chart with scrollbar and small chart area, so that it can be fast opened and scrolled through the data? May be, there should be double buffering to increase repaint speed, or something like this?


UPD: So far I've resolved the issue going to ZedGraph library. I've used var line = new FilteredPointList(Double[], Double[]); for my data array and method line.SetBounds(Double, Double, Int32);, called every time when ScrollEvent or ZoomEvent occur. More info here.


But still don't know how to optimize MS chart. Wondering, if it has the same method to exclude excessive points from rendering.


Aucun commentaire:

Enregistrer un commentaire