什么是最好的开源 Java 图表库?(jfreechart 除外)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/265777/
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-11 12:13:13  来源:igfitidea点击:

What is the best open-source java charting library? (other than jfreechart)

javachartsplot

提问by fccoelho

Why are there not more opensource easy to use charting libraries for Java?. The only successful opensource project in this area seems to be jfreechart, and it doesn't even have any documentation or examples available.

为什么没有更多易于使用的开源 Java 图表库?这个领域唯一成功的开源项目似乎是 jfreechart,它甚至没有任何可用的文档或示例。

采纳答案by Julien Chastang

There is charts4jwhich is a charts and graphs API. It enables developers to programmatically create the charts available in the Google Chart APIthrough a straightforward and intuitive Java API.

charts4j,它是一个图表和图形 API。它使开发人员能够通过简单直观的 Java API以编程方式创建Google Chart API 中可用的图表

Disclaimer: I wrote charts4j. We will be doing another major release in the next few weeks.

免责声明:我写了charts4j。我们将在接下来的几周内发布另一个主要版本。

回答by BoboTheCodeMonkey

There is JChart which is all open source. I'm not sure exactly what you are graphing and how you are graphing it (servlets, swing, etc) so I would say just look at a couple different ones and see which works for you.

JChart 是所有开源的。我不确定您正在绘制什么图形以及如何绘制它(servlet、swing 等),所以我想说看看几个不同的,看看哪个适合您。

http://sourceforge.net/projects/jchart/

http://sourceforge.net/projects/jchart/

I've also used JGraph but I've only used their commercial version. They do offer an open source version however:

我也使用过 JGraph,但我只使用过他们的商业版本。然而,他们确实提供了一个开源版本:

http://www.jgraph.com/jgraph.html

http://www.jgraph.com/jgraph.html

回答by Bill the Lizard

There aren't a lot of them because they would be in competition with JFreeChart, and it's awesome. You can get documentation and examples by downloading the developer's guide. There are also tons of free online tutorials if you search for them.

数量不多,因为它们将与JFreeChart竞争,而且非常棒。您可以通过下载开发人员指南来获取文档和示例。如果您搜索它们,还有大量免费的在线教程。

回答by Dan Dyer

Good question, I was just looking for alternatives to JFreeChart myself the other day. JFreeChart is excellent and very comprehensive, I've used it on several projects. My recent problem was that it meant adding 1.6mb of libraries to a 50kb applet, so I was looking for something smaller.

好问题,前几天我只是在寻找 JFreeChart 的替代品。JFreeChart 非常出色且非常全面,我已经在多个项目中使用过它。我最近的问题是这意味着将 1.6mb 的库添加到 50kb 的小程序中,所以我正在寻找更小的东西。

The JFreeChart FAQitself lists alternatives. Compared to JFreeChart, most of them are pretty basic, and some pretty ugly. The most promising seem to be the Java Chart Construction Kitand OpenChart2.

JFreeChart的常见问题本身列出的替代品。与 JFreeChart 相比,它们中的大多数都非常基础,有些非常丑陋。最有前途的似乎是Java Chart Construction KitOpenChart2

I also found EasyCharts, which is a commercial product but seemingly free to use in some circumstances.

我还发现了EasyCharts,它是一种商业产品,但在某些情况下似乎可以免费使用。

In the end, I went back to the tried and trusted JFreeChart and used Proguardto butcher it into a more manageable size.

最后,我回到了久经考验且值得信赖的 JFreeChart 并使用Proguard将其切割成更易于管理的大小。

I suggest that you take another look at JFreeChart. The user guide is only available to buy, but the demoshows what is possible and it's pretty easy to work out how from the API documentation. Basically you start with the ChartFactorystatic methods and plug the resultant JFreeChartobject into a ChartPanelto display it. If you get stuck, I'm sure you'll get some quick answers to your problems on StackOverflow.

我建议你再看看 JFreeChart。用户指南仅可购买,但演示展示了可能的内容,并且很容易从API 文档中找出方法。基本上,您从ChartFactory静态方法开始,并将生成的JFreeChart对象插入ChartPanel以显示它。如果您遇到困难,我相信您会在 StackOverflow 上快速找到问题的答案。

回答by mjh2007

I've used EasyCharts in the past and it lived up to it's name. It's not as powerful as JFreeChart, but the JAR for EasyCharts is much smaller than for JFreeChart.

我过去使用过 EasyCharts,它名副其实。它不如 JFreeChart 强大,但 EasyCharts 的 JAR 比 JFreeChart 小得多。

回答by Rick

EasyCharts is commercial so i couldn't use it for my project. I used the GRAL graphing library instead. I found it very easy to customize and it's licensed under LGPL just like JFreeChart, so you can use it for free:

EasyCharts 是商业的,所以我不能在我的项目中使用它。我改用了 GRAL 图形库。我发现它很容易定制,并且像 JFreeChart 一样在 LGPL 下获得许可,因此您可以免费使用它:

http://trac.erichseifert.de/gral

http://trac.erichseifert.de/gral

回答by Martin

You can try Jzy3d. It helps drawing simple 3d charts (surfaces, scatters, bars, etc), and has lot of options for customizing layout of axes, ticks, etc. There are lot of examples and a documentation on the wiki.

你可以试试Jzy3d。它有助于绘制简单的 3d 图表(曲面、散点图、条形图等),并且有很多用于自定义轴、刻度等布局的选项。 wiki 上有很多示例和文档。

It's free and open source.

它是免费和开源的。

Cheers,

干杯,

Martin

马丁

回答by Poik

For dynamic 2D charts, I have been using JChart2D. It's fast, simple, and being updated regularly. The author has been quick to respond to my one bug report and few feature requests. We, at our company, prefer it over JFreeChart because it was designed for dynamic use, unlike JFreeChart.

对于动态 2D 图表,我一直在使用JChart2D。它快速、简单,并且会定期更新。作者很快就回复了我的一个错误报告和一些功能请求。在我们公司,我们更喜欢它而不是 JFreeChart,因为它是为动态使用而设计的,与 JFreeChart 不同。

回答by suvi

There is a new charting library in town: JChartlibJChartLib http://freshmeat.net/projects/jchartlib

镇上有一个新的图表库:JChartlibJChartLib http://freshmeat.net/projects/jchartlib

回答by sebastien

I found this framework: jensoft sw2d, free for non commercial use (dual licensing)

我找到了这个框架:jensoft sw2d,免费用于非商业用途(双重许可)

http://www.jensoft.org

http://www.jensoft.org

regards.

问候。