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
1
vote
1 answer

Afree chart : How to increase X axis values(gap or domain range) while zooming

Can anyone help me on below zooming! While doing horizontal zoom, I would like to increase and display the gap or range. Now the range is on attached link is 10,12,14,16... while zooming it should display as 10,11,12,13,... How I can increase this…
Bose
  • 243
  • 3
  • 11
1
vote
2 answers

Dynamically building and updating Histograms with JFreeChart

I've got a stream of incoming data that I would like to plot using a simple histogram. I don't know the range of values, or the proper resolution or bin width to use for the histogram. SimpleHistogramDataset provides some of this functionality, but…
job
  • 9,003
  • 7
  • 41
  • 50
1
vote
1 answer

Stacked Bar Chart having upper limit line using jfreechart

I'm trying to generate a Stacked Bar Chart having an upper limit for each and every category. The upper limit varies for each and every category and is indicated by a horizontal line. I was able to generate the stacked bar chart but got struck with…
chandu
  • 403
  • 1
  • 6
  • 15
1
vote
3 answers

Jfreechart unable to set time in X axes

I'm trying to to make a chart that takes data from serial port and plot them in y axes and i want current time in x axes.. I think that i set my code correctly because i managed to run it as XY chart now in TimeSeries chart my only issue is that in…
user3572380
  • 81
  • 3
  • 9
1
vote
1 answer

JFreeChart PolarPlot remove radius labels?

Any ideas? There is no setRadiusLabelsVisible(...) or setLabelGenerator(null) method which exists for at least some of the other charts. :)
MSpeed
  • 8,153
  • 7
  • 49
  • 61
1
vote
3 answers

Area chart in JFreeChart includes zero

Here is how my area chart in JFreeChart looks like. The area chart starts from 0 and rises up to the first value 5 or 1. Also after 400 on the y axis it falls down back to zero. I want it to start from 5 or 1 and not fall back to 0 after 400.…
Salil Surendran
  • 2,245
  • 4
  • 27
  • 42
1
vote
1 answer

How add more than one line at a freechart Java?

I did a Java application and need to add a graphics to that. I could do this, but I can only add a product (line) to each graph. I wish I could add more. Here is my code String query="select date,price from produtcs where idProduct like…
rpirez
  • 431
  • 2
  • 8
  • 20
1
vote
2 answers

JFreeChart Null Pointer issue

I'm just trying to run a demo of a 'simple' pie chart I found online. I'm running this in Eclipse Kepler and I keep getting, Exception in thread "main" java.lang.NullPointerException at…
Matt
  • 3,508
  • 6
  • 38
  • 66
1
vote
1 answer

JFreeChart: remove gridlines on CombinedDomainXYPlot with PeriodAxis

Context: Java swing application generating a chart using JFreeChart. The chart is a CombinedDomainXYPlot (using XYBarRenderer) that on the X-axis has a timeline based on PeriodAxis. Problem: I can't remove the vertical gridlines (not the tickmarks…
Tom
  • 1,375
  • 3
  • 24
  • 45
1
vote
0 answers

Java Swing repaint & threads

Context: in my Java Swing app I have a chart (using JFreeChart) and when the user clicks on a datapoint on it, it opens a specific flash animation in a JDialog (flash played using DJNativeSwing). Problem: when the flash animation starts playing, for…
Tom
  • 1,375
  • 3
  • 24
  • 45
1
vote
1 answer

jfreechart each plot in JSplitPane

Has anyone implemented a CombinedXYPlot type of plot with each plot in a JSplitPane rather than all plots in one JPanel? This way one of the size dimensions of each plot could be modified without affecting the other plots (eg the…
Don Smythe
  • 9,234
  • 14
  • 62
  • 105
1
vote
1 answer

Java JFreeChart: customize tooltip screen position

I implemented my own JFreeChart XYToolTipGenerator and, as the chart it is used on is almost full screen, sometimes the tooltip position (on screen) hides the point it is related to (e.g. in the bottom right corner, since it seems that tooltip is…
Tom
  • 1,375
  • 3
  • 24
  • 45
1
vote
1 answer

Add listener to Legend

I am using XYPlot class from jfreechart library. I have got two XYSeries and there are legend of them in the bottom of the ChartPanel. Now I want to process mouse click events on that legend. Is it possible to add listener to the legend? If it is…
lnk
  • 593
  • 2
  • 11
  • 27
1
vote
1 answer

DynamicTimeSeriesCollection and Serial communications

I am using DynamicTimeSeriesCollection to plot measurements from serial port into my graph. I want to use the code that I have found in another post. I want to achieve something like this: Using JFreeChart to display recent changes in a time…
Ignavis
  • 35
  • 3
1
vote
1 answer

How to change to color of a point in JFreechart

I'm making a program that needs to plot graphs with many different colors and shades . More specifically, I'm using a scatter graph, and for each new point it has to be in a darker shade than the previously one. When the color of the point became…
Rikkin
  • 509
  • 1
  • 5
  • 20