C# 可以推荐用于 .NET 的 ZedGraph 图表库吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/536018/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-04 07:11:06  来源:igfitidea点击:

Can the ZedGraph charting library for .NET be recommended?

c#graphicschartszedgraph

提问by mustafabar

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?

我正在为我公司做一个项目,在研究股市的过程中需要将一些不同类型和平均复杂度的图集成到C#中。我在 Internet 上找到了这个免费库,ZedGraph。如果您遇到它,您是否建议使用它?它的支持情况如何?

采纳答案by Peter Mortensen

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.

我可以推荐 ZedGraph。多年来,我一直在MSQuant 中使用它取得了巨大成功,对于大多数图:质谱显示、重新校准误差图、LC 峰图、定量曲线等。

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

以下是使用 ZedGraph 的 MSQuant 的一些屏幕截图:

  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
  1. 散点图,带趋势线
  2. 显示实际数据点的 XY 图,线连接数据点
  3. 棒状图,带有重叠注释(TextBox实际上是 es)
  4. 同一窗口中的多个图,类型如 2. 和 3.(下半部分的两个图)
  5. 仔细看看类型 2。
  6. 拼贴,键入 2. 和 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..

第一个图背后的源代码可以在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.

与许多其他图表库相比,ZedGraph 还可以用于面向科学/数学的绘图/图表(例如散点图),而不仅仅是用于业务类型的绘图/图表。股票市场应用程序可能还需要散点图。

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

在 ZedGraph 中,内置支持用户放大(无限)和缩小、平移(按住Ctrl键的同时拖动 )、将绘图保存到文件或将其复制到剪贴板。

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).

我在 ZedGraph 中缺少一件事:用户在图中选择项目以便对这些选定项目执行某些操作的能力(例如,计算一些数字,将它们接受为已验证或将它们标记为异常值应用程序)。

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.

不要被 ZedGraph 的发展状况所拖延。ZedGraph 已经成熟,质量非常高,可以按原样使用。应该有一个新团队支持其进一步发展。

回答by Ian Hopkinson

Do you mean Zedgraph rather than Zgraph? Zedgraph's homepage is hereand 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.

你是说 Zedgraph 而不是 Zgraph?Zedgraph 的主页在这里,并在此处的 CodeProject 文章中进行了描述。如果你在谈论 Zedgraph,我可以推荐它,我在 C# 方面的经验相对较少,但在数据可视化方面有很多经验。我发现启动和运行 Zedgraph 并生成漂亮的图表很简单。Zedgraph 非常适合 2D 绘图,我仍在寻找 3D 绘图的等价物。

回答by Ian Hopkinson

I hate to be a killjoy but I wouldn't recommend ZedGraph. I was working with it a couple years ago and noticed that the support was provided by a single enthusiast that seemed abused by everyone wanting his freeware with no compenstation 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 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.

我讨厌成为一个杀手,但我不推荐 ZedGraph。几年前我在使用它并注意到支持是由一个爱好者提供的,似乎每个人都想要他的免费软件而没有任何补偿或贡献。这是许多 FOSS 作者面临的诅咒。看起来软件已经一年多没有更新了,帮助论坛上充满了没有回应的问题。看来作者失去了兴趣,走了。如果你使用 ZedGraph,这样做是因为你想维护底层代码,因为你想回馈用户/开发者社区。如果您对贡献没有兴趣,并且您无法为自己维护它,请为行不通的事情做好准备,而且永远不会。

I hope that helps someone.

我希望能帮助某人。

回答by Jamie Ide

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

我强烈推荐Microsoft Chart Controls For .NET Framework 3.5 而不是 ZedGraph。

回答by Winston Smith

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

尽管开发似乎停滞不前,但WPF 动态数据显示看起来很有希望。

回答by user423430

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.

ZedGraph 似乎不再受原始开发人员的支持。但是,您可以在其他已进行更新的项目中找到它。

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

例如,每讨论一个ZedGraph项目讨论列表:

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 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.

所以我为所有曲线和对象高度优化了 ZedGraph。基本上,我优化了它使用 GDI 的方式,并特别使它只绘制适合图表的对象。

因此,即使图表上有数百万个对象,它现在也能非常有效地滚动和缩放。此外,它在实时运行时使用的 CPU 几乎为零,因为跟踪金融图表的速度较慢。

我还修复了一些缺陷。

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

您可以在此处找到带有更改的 repo 的分支。

回答by littlecodefarmer758

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

ZedGraph 不支持 3D 绘图,例如 Surface Chart: Implied Vol Surface