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

- 398,270
- 210
- 566
- 880
-
2One very useful contribution to jfreechart was a simple API That would allow you the generate a plot with a simple function call like so: plot(array) and get a chart object in return which you could futher customize, i.e. add a title, gridlines, etc... – fccoelho Nov 06 '08 at 08:08
-
4for some things (high-speed mathematical plotting) jfreechart is mediocre, not awesome. – Jason S Jul 02 '13 at 16:00
-
-
2I don't, not in Java. I found JChart2D better than JFreeChart, but it had its limitations as well; for one project I ended up making my own graphing library, a painful experience but it did what I needed. I wish that a port of Python's matplotlib were available in Java. – Jason S Jul 02 '13 at 22:08
-
9
-
2Calling JFreeChart "awesome" is overstating it. "Awesome for simple stuff" might be more accurate. +1 for a matplotlib clone for Java – garyp Aug 16 '13 at 20:09
-
-
@JasonS, I'm not sure how "high-speed" you're talking about. I have integrated JFreeChart into our application doing mathematical simulates. The simulation engine is really fast and we plot the plots in real time and are able to update dozens of graphs (each with 2-6 line plots) as the user adjusts parameters by dragging their fingers across the trackpad over the parameter to change the value in real time. There is zero lag and a high enough frame rate that it's smooth as butter. Is that high-speed mathematical plotting? Of course it's now 2021, but we've been doing this since 2010. – Jason Oct 09 '21 at 22:00
-
My complaint about JFreeChart is that the charts are ugly. This is of course an opinion. The font's are pixelated or blurry (antialiasing is poor) and same with the lines. The library is not taking advantage of the resolution available to it while other parts of Java are and drawing beautiful fonts and lines. The contrast is stark making the JFreeChart graphics look like they're from the 1990's while the rest of the application looks modern. – Jason Oct 09 '21 at 22:04
-
Output from things like Google's Chart API are incredibly beautiful compared to JFreeChart, but this is not integrated locally... it would be a remote service. – Jason Oct 09 '21 at 22:05
-
-
-
I have since updated my JFreeChart library to the latest version, which has support for HiDPI displays. I may have made a few other changes. The pixelation and blurry fonts are now gone and things look much better. I still think Google's charts look better, but the graphs drawn in JFreeChart in my application are no longer ugly in my opinion. So I retract my statement about the charts being ugly. – Jason Jan 24 '22 at 19:49
There is charts4j which is a charts and graphs API. It enables developers to programmatically create the charts available in the Google Chart API through a straightforward and intuitive Java API.
Disclaimer: I wrote charts4j. We will be doing another major release in the next few weeks.

- 23,572
- 15
- 99
- 156

- 17,592
- 12
- 63
- 89
-
11Good job! The only downside is the need for an internet conection, though I cant remenber when was the last time I was disconnected. ;-) – fccoelho Nov 06 '08 at 08:01
-
20@pyinsci: some shops prevent servers from connecting to external internet servers (even if the servers are reachable from the internet) for security reasons. – Joachim Sauer May 17 '10 at 13:36
-
4Notice that the Google static charts API has been deprecated since April 20, 2012 – David Rabinowitz Jan 21 '13 at 07:44
-
7An alternative API that doesn't need to connect to external Internet servers is [XChart](https://github.com/timmolter/XChart). – herrtim Feb 28 '14 at 09:52
-
If you're targeting Web browser, you can take a look at [ZK Charts](http://www.zkoss.org/zkchartsdemo/line_basic). – Tom Yeh Mar 13 '14 at 01:23
-
Iceberg Charts : https://github.com/oliverwatkins/Iceberg-Charts/wiki is quick and easy to get started – Oliver Watkins Mar 06 '16 at 16:31
-
Is it still working in 2016? :D Any other libraries that uses Google Charts? – Defozo May 17 '16 at 19:34
-
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:

- 1
- 1
- 2
-
1I know it is too late, but I am searching for documentation, not able to find one. Can you please share, if you have anything? – varunrao321 Feb 04 '13 at 14:40
-
2Check out iceberg charts : http://frontangle.com/icharts/ I created it. I think its up there with JFreechart and all the rest. – Oliver Watkins Aug 13 '16 at 15:30
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.
The JFreeChart FAQ itself 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 Kit and OpenChart2.
I also found EasyCharts, which is a commercial product but seemingly free to use in some circumstances.
In the end, I went back to the tried and trusted JFreeChart and used Proguard to butcher it into a more manageable size.
I suggest that you take another look at JFreeChart. The user guide is only available to buy, but the demo shows what is possible and it's pretty easy to work out how from the API documentation. Basically you start with the ChartFactory static methods and plug the resultant JFreeChart object into a ChartPanel to display it. If you get stuck, I'm sure you'll get some quick answers to your problems on StackOverflow.

- 53,737
- 19
- 129
- 165
-
I created a simple "plot" wrapper around java chart construction kit, which makes it really easy to use for simple plots https://bitbucket.org/hughperkins/easyjcckit – Hugh Perkins Oct 18 '12 at 07:24
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.
It's free and open source.
Cheers,
Martin

- 10,377
- 11
- 69
- 89

- 2,285
- 1
- 28
- 39
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.

- 2,022
- 27
- 44
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.
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:

- 427
- 5
- 11

- 1,157
- 1
- 10
- 18
There is a new charting library in town: JChartlib JChartLib http://freshmeat.net/projects/jchartlib

- 1
- 1
-
It looks great!! Lightweight and no dependencies, wow, nice work. I took a look at the the wiki, pretty straightforward. My question: does it allow categories instead of numeric values on the X axis? – Gigab0rt Sep 19 '11 at 22:26
-
2Wow, cool thanks for comment. The number of series are actually not limited in the linecharts. It draws as many charts as you like. I just released a new version that is able to save the chart to a jpg or png file. More chart type like barchart, cakechart, radarchart and so on are in the planning. – suvi Sep 23 '11 at 15:02
-
-
-
The main reason why I would consider using a different charting library other than jfreechart is that it would be nice to have a charting library that is (i) maintained by a community (ii) has decent documentation about how to use it available for free. Unfortunately jchartlib offers no advantage on either of these points :-( – Hugh Perkins Oct 18 '12 at 05:43
I found this framework: jensoft sw2d, free for non commercial use (dual licensing)
regards.

- 1
- 1
-
2This site mentions that sw2d is licensed using the LGPL; isn't that free to use in both open-source and commercial tools? – Ewan Heming Sep 11 '12 at 22:31
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.

- 776
- 1
- 8
- 17