Questions tagged [jfreechart]

JFreeChart is a free Java chart library with many available chart types and support for numerous output types. The latest version is 1.5.0 released on 2017-11-05. The license is LGPLv2 (or later).

JFreeChart is a free Java chart library with many available chart types and support for numerous output types. The project includes a gallery of sample charts and detailed examples of several basic chart types; click on the relevant link to see the corresponding source. In addition, older examples may be found here, and a list of frequently asked questions is available; addenda appear in the maintainer's support forum and discussions area.

Its source code is on GitHub. Current and previous versions of JFreeChart can be obtained from Maven.org. Releases are seen here. The online javadoc API are listed here. The creator also provides a Developer Guide document which can be purchased here.

Frequently asked questions are present here.

Requirements

JFreeChart requires the Java platform. Note that JFreeChart is a class library for use by developers, not an end user application.

Related Links:

2745 questions
37
votes
3 answers

Using JFreeChart to display recent changes in a time series

How can I use JFreeChart to display just the most recent data in a continually updated time series? Addenda: A complete, working example that incorporates the accepted answer is shown here. See also this variation having two series. See also this…
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
34
votes
2 answers

Invalid or corrupt JAR File built by Maven shade plugin

After adding the Maven jFree dependency to my existing application, I'm not able to execute the created jar. The only error message I get is the following: java -jar target/com.company.product-1.0.0-SNAPSHOT.jar Error: Invalid or corrupt jarfile…
d0x
  • 11,040
  • 17
  • 69
  • 104
31
votes
3 answers

JFreeChart BarChart -> NO gradient

my bar chart is always drawn with a gradient color by default. I just want a simple color without any styled effects. Can anyone help ? Code: final JFreeChart chart = ChartFactory.createBarChart( "", // chart title xLabel,…
shorty
  • 489
  • 2
  • 6
  • 12
29
votes
5 answers

Can't find bundle for base name

I'm using a library that has a dependency on jfreechart (v 1.0.9). When I try to run the .jar, I get: java.util.MissingResourceException: Can't find bundle for base name org.jfree.chart.LocalizationBundle, locale en_US at…
Shane Castle
  • 1,749
  • 2
  • 16
  • 22
25
votes
1 answer

How can I update a JFreeChart's appearance after it's been made visible?

How can I use JFreeChart to dynamically update a chart's appearance after it's been made visible?
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
24
votes
2 answers

Setting Range for X,Y Axis-JfreeChart

Any suggestions over how to set Range for X-Axis and Y-Axis. My "X-Axis" Range is from "0.00 to 1.00" with difference of "0.05". I mean 0.00 0.05 0.10 0.15.....0.90 0.95 1.00 My "Y-Axis" Range is from "0.0 to 1.0" with difference of "0.1". I mean…
Sam
  • 603
  • 3
  • 7
  • 17
20
votes
2 answers

How to specify the position and layout of a JFreeChart chart legend

I am using JFreeChart to render a stacked area chart. By default, the chart legend is rendered below the plot with the elements laid out horizontally. I would like the legend to appear on the right of the plot with the elements laid out as a…
ireddick
  • 8,008
  • 2
  • 23
  • 21
18
votes
4 answers

Width of the bar in Jfreechart

Is there a way to adjust the width of the bars in a Barchart? I create my chart with the following code. final JFreeChart chart = ChartFactory.createBarChart("Report", // chart title "Date", // domain axis label …
Harish
  • 1,617
  • 4
  • 21
  • 20
17
votes
2 answers

Changing background colour of jFreeChart

I am trying to change the background color of jfreechart. It is displaying in grey color and I want a white background. I have tried chart.setBackgroundPaint(Color.WHITE); However it does not show me the white background. I have the following…
nzy
  • 854
  • 2
  • 15
  • 28
15
votes
8 answers

Real-time graphing in Java

I have an application which updates a variable about between 5 to 50 times a second and I am looking for some way of drawing a continuous XY plot of this change in real-time. Though JFreeChart is not recommended for such a high update rate, many…
thodinc
  • 205
  • 1
  • 2
  • 9
14
votes
7 answers

Looking for a javascript chart library that can draw ~200,000 points on a scatter plot

I am building a web application who's interface includes a large scatter plot to give the user an overview of his data. The scatter plot has about 200,000 points. Currently I am using the JFreeChart Java library server side which does a great job of…
mojones
  • 1,640
  • 3
  • 15
  • 26
14
votes
1 answer

Change font-size of domain axis label and range axis label for jfreechart

My goal is to increase the size of "Revenue ($) " and "Years". But I do not know how. I am able to increase the "Apples, Durians,Oranges" and "2012, 2013". Below are my codes. JFreeChart chart = ChartFactory.createBarChart3D("", // chart…
newbieinjavaversion2
  • 489
  • 5
  • 12
  • 23
14
votes
2 answers

JFreeChart x axis scale

I have a JFree XY Line chart which always starts at x = 0. Then based on user defined settings from a properties file, the application increments based on that number (this represents the time in minutes). For example, x = 0 to start the user…
Biscuit128
  • 5,218
  • 22
  • 89
  • 149
13
votes
4 answers

Add a JFreeChart in to JPanel

if i have a my Jpanel and a my JFreeChart. How can I add this Chart in to the JPanel? XYSeries series = new XYSeries("XYGraph"); series.add(1, 1); series.add(1, 2); series.add(2, 1); series.add(3, 9); series.add(4, 10); // Add the…
Safari
  • 11,437
  • 24
  • 91
  • 191
13
votes
2 answers

Changing the shapes of points in scatter plot

I have thousands of points to Plot on a JFreeChart scatter plot. The problem right now is that my program is plotting points with "squares", but I need some help on how to change the Shape of points from "squares" to "dots/circles". Any help would…
Sam
  • 603
  • 3
  • 7
  • 17
1
2 3
99 100