Question

Is there any predefined component in Java Swing that allow to draw histograms or functions graphs?

If there is not. Does anyone know a good open-source library with a license that is not GPL2.0/3.0 ? ( I need any product licensed under MIT/Apache/Eclipse/LGpl licenses).

thanks in advance

Was it helpful?

Solution

JFreeChart is a popular Java library with which you can make all kinds of charts, including histograms and function graphs. It's licensed with the LGPL license.

Something that I find a little annoying with JFreeChart is that you have to pay for their Developer Guide, and that you have to pay for each user of that guide separately (i.e. one developer can't legally lend his copy to another developer, unless you buy a more expensive site license). API documentation is available for free though.

OTHER TIPS

For a general purpose graphing library, try out Batik SVG Toolkit (Apache license). With Batik, you can embed any kind of SVG graphics into your Swing applications, including histograms and function graphcs. For Swing-specific documentation, see "Batik Swing Components".

Drawing histograms and function graphs in SVG is rather trivial. The histogram example you linked from Wikipedia for instance is an SVG file and can be viewed with Batik.

JFreechart is the common solution, but on their site they list other options with the licensing details.

http://www.jfree.org/jfreechart/faq.html#FAQ13

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top