1

A lot of chart libraries (Winforms and WPF) limit the granularity seen when zooming into a chart. I generate charts containing millions of data points, time stamped at the millisecond level, and while I am not interested in seeing all data points on the chart (data aggregation or sampling would actually be preferable) I want to be able to zoom in as much as I want, essentially down to the single data point level irrespective of the amount of data in the bound data collection.

As I am currently still undecided whether to go with Winforms or WPF I extensively tested the DevExpress chart library and felt it did not fit my needs. It handles large data sets very poorly in that a) it becomes incredibly slow even when using "SwiftSeries" and even when turning on data sampling/aggregation (whats the point to sample/aggregate if the charts are as unresponsive as without sampling) and b) it did not allow zooming down to the single data point level. The larger the data series the less detail is visible at the maximum zoom level which I think should not be the case because there is no technical limitation to zooming to the single data point level.

Can you point me to a professional chart library that can handle the following:

  • WPF or Winforms (prefer Winforms
  • Handle data series potentially containing 1-2 million data points
  • zooming down to the single data point level (very important)
  • potentially be able to swiftly scroll and zoom through the entire data set through usage of data sampling/ data aggregation (but thats not a requirement just a preference)

Thanks

Matt
  • 7,004
  • 11
  • 71
  • 117
  • There's a reason for that - numeric precision - .NET has no 128bit long double type and Decimal does not have the dynamic range (exponent) of Double or even Float. All calculations inside a charting component done using Doubles limit how far you can zoom before numeric precision breaks down. So, charts often tend to limit zooming to prevent the visual artefacts you get at the extremes of numeric precision. It would be good if some critical calculations were performed with 128-bit precision as that would allow further (deeper) zooming, but ultimately the same problem occurs again – Dr. Andrew Burnett-Thompson Jul 07 '14 at 14:29
  • I see your point but I do not think this argument applies to some charting libraries that do not even allow to zoom in to visualize individual or a dozen data points out of a total of about 100,000. DevExpress as far as I understand uses floats not doubles and from a mathematical standpoint with mentioned data set there should be no reason not to zoom to a single data point. I am certainly not as experienced in this field as you are and just arrived at my conclusion from a back-off-the-envelope thought experiment. – Matt Jul 08 '14 at 15:30
  • @MattWolf Have you had any traction on this issue? I am also looking for a charting solution that will allow me to load large amounts of data (generally 1-2 million points) at aggregate and then load finer granularity at zoom. I have had little luck. Microsofts WinForms Chart control can do the trick (no aggregation) but it is quite slow. DevExpress, Telerik and ComponentOne all choke on a OutOfMemoryException when trying to display that much data. – CodeWarrior Jul 24 '14 at 01:06
  • 1
    @CodeWarrior, I have tried SciCharts and I am very pleased with performance and it can easily handle a 1-2 million data points. It is a WPF library and while there is room for improvement on the customization side of axes, annotations, multi-panes, the bindings work well and rendering is very smooth. I can zoom to single data points. It is not an open source library but I think in the end the old adage goes that you get what you pay for. – Matt Jul 24 '14 at 01:59
  • Hey all, we've improved the problem of deep zoom in SciChart but its still not perfect. The reason of numerical precision is still to blame. We can make fully generic our rendering pipeline, but this would have a severe impact on performance. I'd welcome your feedback on deep-zoom and if it is affecting your work, and what we can do to improve it over at scichart.com - Andrew **MD and Owner of SciChart** – Dr. Andrew Burnett-Thompson Feb 12 '15 at 15:05

2 Answers2

3

Probably this solution comes late. Anyway...

I've faced your problem before. I did in this way: From the perspective a chart is not able to show you millions of data points due to screen limitations, you know, a point a pixel. I made a pre-processing of data points. I estimated the number of points to show, for instance 2000 data points (or pixels). I grouped all data points in 2000 chunks and calculated max and min values of every chunk. Then I just feed the chart with a sequence of 2000 vertical bars. When users zoom or pan, I just recalculate with the same pre-process using the new range.

oarrivi
  • 191
  • 9
  • good you mentioned this, as I am getting back to this issue after having pushed it down on my priority list. So you basically sample the data and re-sample when you require more data points, for example, when zooming in? – Matt May 19 '15 at 08:40
  • 1
    Well. Resample doesn't mean to fetch millions of data points again. You could keep them in memory. But it will be cheaper than keep millions of graphic structures of points in memory. I meant something like: void PreProcessMillionsOfDataPoints(int outSize, double[] xValuesIn, double[] yValuesIn, double[] xValuesOut, double[] yValuesOut) Of course you could add new arguments for the x axis range, pan, etc. – oarrivi May 19 '15 at 09:04
  • sorry, yes, that is what I meant. I intend to keep all data points in memory but derive a sub-sample and render that sub-sample as function of requested chart precision. – Matt May 19 '15 at 09:10
0

Open source charting library for the .NET Framework

NPlot is an open source charting library for the .NET Framework. Its interface is both simple to use and flexible. The ability to quickly create charts makes NPlot an ideal tool for inspecting data in your software for debugging or analysis purposes. On the other hand, the library's flexibility makes it a great choice for creating carefully tuned charts for publications or as part of the interface to your Windows.Forms or Web application.

more info

http://netcontrols.org/nplot/wiki/

http://www.codeproject.com/Tips/460918/Generate-graph-using-Nplot

pushpraj
  • 13,458
  • 3
  • 33
  • 50
  • Sorry but this does not fit the bill, because it is not maintained, it cannot handle data sets the size I specified because it is unresponsive when scrolling and zooming such data sets. This would also include OxyPlot. I look for a library that can handle the requirements. But thanks for the suggestion. – Matt Jun 04 '14 at 08:04