14

I am working on a project for my company, and I need to integrate some graphs of different types and average complexity to C# in the process of studying stock markets. I found this free library on the Internet, ZedGraph. If you came across it, do you recommend using it? And how well is it supported?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
mustafabar
  • 2,317
  • 6
  • 31
  • 47

7 Answers7

23

I can recommend ZedGraph. I have been using it with great success for several years in MSQuant, for most plots: mass spectrum display, recalibration error plots, LC peak plots, quantitation profiles and others.

Here are some screen-shots from MSQuant where ZedGraph has been used:

  1. Scatter plot, with trendline
  2. X-Y plot with the actual data points shown, line connection data points
  3. Sticks plot, with overlayed annotation (TextBoxes, in fact)
  4. Several plots in the same window, types as in 2. and 3. (the two plots in the bottom half)
  5. Closer look at type 2.
  6. Collage, type 2. and code in Visual Studio

The source code that is behind the first plot can be found in Source code for MSQuant: frmRecalibrationVisualisation.vb, MSQuant/msquant/src/GUI/forms/frmRecalibrationVisualisation.vb..

In contrast to many other charting libraries, ZedGraph can also be used for scientific/math oriented plots/charts (for example, scatter plots) and not only for business-type plots/charts. Stock market applications may also need scatter plots.

In ZedGraph, there is built-in support for the user to zoom in (infinite) and zoom out, pan (drag while holding down the Ctrl key), save the plot to a file or copy it to the clipboard.

There is one thing I am missing in ZedGraph: the ability for the user to select items in the plot in order to perform some action on those selected items (for example, computing some number, accepting them as verified or marking them as outliers to the application program).

Don't be put off by the state of ZedGraph's development. ZedGraph is mature, is of very high quality, and can be used as-is. There is supposed to be a new team behind its further development.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
6

ZedGraph does not appear to be supported by the original developers anymore. However, you can find it as part of other projects where updates have been made.

For example, per this discussion on a ZedGraph project discussion list:

So I highly optimized ZedGraph for all the curves, and objects. Basically, I optimized how it uses GDI and specifically made it only draw objects that will fit in the chart.

So it scrolls and zooms now extremely efficiently even if I have many millions of objects on the chart. Plus it users nearly zero CPU when it's running in real-time as slower speeds for tracking financial charts.

I fixed a few defects also.

You can find a fork of the repo with the changes here.

Rahul
  • 3,293
  • 2
  • 31
  • 43
user423430
  • 3,654
  • 3
  • 26
  • 22
5

I strongly recommend the Microsoft Chart Controls For .NET Framework 3.5 over ZedGraph.

Jamie Ide
  • 48,427
  • 16
  • 81
  • 117
3

Do you mean Zedgraph rather than Zgraph? Zedgraph's homepage is here and is described in a CodeProject article here. If you are talking about Zedgraph I can recommend it, I have relatively little experience in C# but quite a lot in data visualization. I found it straightforward to get Zedgraph up and running and producing good-looking charts. Zedgraph is very good for 2D charting, I'm still looking for an equivalent for 3D plotting.

Rahul
  • 3,293
  • 2
  • 31
  • 43
Ian Hopkinson
  • 3,412
  • 4
  • 24
  • 28
2

I hate to be a killjoy, but I wouldn't recommend ZedGraph.

I was working with it a couple of years ago and noticed that the support was provided by a single enthusiast that seemed abused by everyone wanting his freeware with no compensation or contributions. It's a curse faced by a lot of FOSS authors.

It doesn't look like the software has been updated in over a year now and the help forum is full of queries with no responses. It looks like the author lost interest and walked.

If you use ZedGraph, do it because you want to maintain the underlying code and because you want to contribute back to the user/developer community. If you have no interest in contributing, and you can't maintain it for yourself, be prepared for things that don't work and simply never will. An enterprising company could sponsor the development of the software and offer for-fee support, but you need to decide for yourself if it's good enough to do that and if there is a real revenue model.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • 6
    Why do something have to be under constant development to be useful? ZedGraph just works. – jgauffin Sep 14 '10 at 09:34
  • Ya got the source code, it is as good as your own. C#/.NET developers are some of the most common these days, anyway. – FastAl Jan 05 '11 at 18:57
  • 3
    I know this answer is late and the author is gone. It is important to mention that [ZedGraph author died in 2009](https://obits.ocregister.com/obituaries/orangecounty/obituary.aspx?n=john-champion&pid=123637224) and what is written regarding interrest losing and walking away is not true. ZedGraph is mature and alive, and its source code has been forked more than one hundred of time. Obviously the author knew what "simplicity" means : not only ZedGraph is perfectly usable out of the box, but it is elegant vision makes it very easy to extend and to customize. – Larry Mar 28 '20 at 23:06
0

ZedGraph does not support 3D graphing, such as Surface Chart: Implied Vol Surface

littlecodefarmer758
  • 968
  • 2
  • 10
  • 23
0

Although development seems to have stalled, WPF Dynamic Data Display looked promising.

Winston Smith
  • 21,585
  • 10
  • 60
  • 75