A 2D chart library for Java applications (JavaFX, Swing or server-side).
A 2D chart library for Java applications (JavaFX, Swing or server-side).
Version 2.0.0, not yet released.
JFreeChart is a comprehensive free chart library for the Java™ platform that can be used on the client-side (JavaFX and Swing) or the server side, with export to multiple formats including SVG, PNG and PDF.
The home page for the project is:
https://www.jfree.org/jfreechart
JFreeChart requires JDK 11 or later. For Java 8 support, check the v1.5.x branch.
The library is licensed under the terms of the GNU Lesser General Public License (LGPL) version 2.1 or later.
JFreeChart can be used with JavaFX via the JFreeChart-FX extensions:
https://github.com/jfree/jfreechart-fx
A small set of demo applications can be found in the following projects here at GitHub:
A more comprehensive set of demos, plus the JFreeChart Developer Guide, is a reward at most tiers of the JFree sponsorship program. Thanks for supporting the JFree projects!
To use JFreeChart in your projects, add the following dependency to your build tool:
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.5.6</version>
</dependency>You can build JFreeChart using Maven by issuing the following command from the root directory of the project:
mvn clean installThe build requires JDK 11 or later.
When migrating from JFreeChart 1.0.x to JFreeChart 1.5.0, please be aware of the following API changes:
getBaseXXX()/setBaseXXX() have been renamed setDefaultXXX()/getDefaultXXX();ChartUtilities class has been renamed ChartUtils;SegmentedTimeline class has been removed due to being (a) complex, (b) not always being correct and, as a result, generating too many support requests;org.jfree.chart.utils.ParamChecks class has been renamed org.jfree.chart.utils.Args.Please refer to Issue 66 for additional info.
Crosshairlabel (#414)EncoderUtil (#378)ThreadLocal for calendars in time series datasets (#171);valueVisible flag to MeterPlot (#231);ChartPanel to handle high DPI displays (#170);ChartPanel (#172);ClusteredXYBarRenderer (#89);PeriodAxis (#198);NumberAxis (bug #64);LogAxis with number format override (#98);TextTitle to throw IllegalArgumentException rather than NullPointerException (#205);ObjectUtils class (#163);URLUtilities class (#162)LayeredBarRenderer (bugs #169 and #175);DefaultPieDataset (bugs #212)isJFreeSVGAvailable() method (bugs #207)BoxAndWhiskerRenderer (#79);DefaultIntervalCategoryDataset no longer allows null keys in constructor (this
is a consequence of introducing generics);ChartFactory;XYStepRenderer;DateAxis.previousStandardDate() method;SegmentedDateAxis;CategoryPlot mapping datasets to axes;ChartCanvas class;CombinedDomainXYPlot and CombinedRangeXYPlot now take into account the pannable flags in the subplots;FastScatterPlot panning direction is corrected;FXGraphics2D;LogAxis labelling;RingPlot;stepPoint attribute in the XYStepAreaRenderer;XYSplineRenderer with new area fill (contributed by Klaus Rheinwald);AbstractDataset;TimeSeriesCollection to validate TimeSeries keys for uniqueness;DirectionalGradientPaintTransformer (by Peter Kolb);OHLCSeries;HMSNumberFormat;DateAxis;BorderArrangement.add() possible ClassCastException;XYSeriesCollection.removeSeries(int) does not deregister listener;WaterfallBarRenderer uses wrong color for diff 0.*** THIS RELEASE REQUIRES JDK/JRE 1.6.0 OR LATER. ***
AttributedString);ChartFactory methods;DatasetUtilities to interpolate y-values in XYDatasets;CategoryAxis;SWTGraphics2D implementation;All the JUnit tests have been upgraded to JUnit 4.
PeriodAxis;Also fixed a line drawing issue with the StackedXYAreaRenderer, and a memory
leak in the SWT ChartComposite class.
XYBarRenderer;PolarPlot;StandardDialScale;This release also fixes a minor security flaw in the DisplayChart class, detected and reported by OSI Security:
http://www.osisecurity.com.au/advisories/jfreechart-path-disclosure
LegendTitle order attribute (by Simon Kaczor);ChartComposite does not dispose popup (by Sebastiao Correia);PaintAlpha for 3D effects (by Dave Law);XYPlots;ValueAxis.reserveSpace() problem for axes with fixed dimension;DeviationRenderer optimisation (by Milan Ramaiya);SWTGraphics2D get/setStroke() problem;DefaultPolarItemRenderer does not populate seriesKey in LegendItem;SWTGraphics2D (by Kevin Xu);DateAxis endless loop (by Martin Hoeller);TimeSeries calculates range incorrectly in addOrUpdate();TimeSeriesCollection.findRangeBounds() regression;XYDifferenceRenderer fix (by Patrick Schlott/Christoph Schroeder);DisplayChart servlet;Also fixed a rendering issue for polar charts using an inverted axis.
This release contains:
PolarPlot;TimeSeriesCollection class;BoxAndWhiskerRenderer;XYZDatasets;CategoryPointerAnnotation line calculation;HistogramDataset.addSeries() fires change change event (by Thomas A Caswell);BoxAndWhiskerRenderer (by Peter Becker);useOutlinePaint flag for BoxAndWhiskerRenderer (by Peter Becker);PolarPlot enhancements (by Martin Hoeller);findRangeBounds() in various renderers.PolarPlot doesn't work with logarithmic axis;LineChart3D - Problem with Item Labels;LogAxis endless loop;TextAnnotation;RelativeDateFormatTest.java is locale dependent;ChartPanel, CompassPlot and PiePlot3D;RingPlot should respect getSectionOutlineVisible();clear() method in CategoryTableXYDataset;PolarChartPanel localisation fix;NaN in DefaultStatisticalCategoryDataset;StackedXYBarRenderer should respect series/item visible flags;getDomain/RangeBounds() for XYShapeRenderer;AbstractCategoryRenderer fix null check in getLegendItems();StandardDialScale checNo open issues yet, or sync has not completed.