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
5
votes
2 answers

Create barchart using jfreechart with bars of same category together

I want to make bar chart using jfreechart such that the bars which belong to the same category should be displayed adjacent without any gaps. The categories should be displayed with gaps. Also each category may have different number of bars. How it…
javdev
  • 794
  • 2
  • 10
  • 23
5
votes
1 answer

JFreeChart Margin

I am using JasperReports to create a line chart for my webapps. I have successfully passed the dataset to the compiled report (created in iReport) and can see the data correctly. However, I want to do some customization on the margin. The value…
Chirag Jhaveri
  • 135
  • 2
  • 14
5
votes
1 answer

Avoid null in dataset for line chart

I'm trying to plot a LineChart using DefaultCategoryDataset and the problem I'm facing is, when I try to plot a null value in between two values either the connection between the two points is lost (i.e the line connecting the two points doesnot…
arshithp
  • 111
  • 1
  • 8
5
votes
1 answer

JFreeChart disable zooming

Is there an easy way to disable zoom in/out feature for XYPlot which is drawn in ChartComposite ? Overriding the zoom methods for XYPlot will be a solution but I wonder if there is an easy way..
penguru
  • 4,342
  • 11
  • 46
  • 56
5
votes
1 answer

Update graph with JFreeChart and slider

I have a time history for arrays describing the pressure along a pipe. So I have an array of pressure values along the length of the pipe for each delta t. I want to plot the pressures along the length of the pipe with JFreeChart and chose which…
Bernardoct
  • 53
  • 1
  • 5
5
votes
1 answer

Extract maxima of the peaks by a treshold from a JFreeChart XYLineChart

I want to implement a feature to a JFreeChart with a XYLineChart. So, for now I have a XYLineChart and I want to find the x-value depending the center of the peaks (see attached figure to understand what I want). So, I want to implement a threshold…
5
votes
2 answers

How can I create a bar-chart with JFreeChart, that shortens too long bars with a visible hint?

I want to create a bar-chart, but extraordinary high values should be shortened. An example is this image: (source: epa.gov) I hope it is clear what I want. My question is: How can I do this with JFreeChart. If it isn't possible with JFreeChart…
Mnementh
  • 50,487
  • 48
  • 148
  • 202
5
votes
1 answer

How to remove automatic axis label stretching?

I am using JFreeChart 1.0.14. The labels of my axis stretch really strangely if the plot is too small/big. I want to turn off that behaviour and want the axis labels always printed at the same width:height ratio. Here is an SSCCE: import…
brimborium
  • 9,362
  • 9
  • 48
  • 76
5
votes
1 answer

Jfreechart: How exclude weekend days from chart?

How exclude one or two day from jfreechart? I have input date without saturday and chart without saturday, but in axis there all date. I have all added item on screen. How viewing <= 100 item on screen and if scrolling to right item add more. …
Denis S.
  • 137
  • 2
  • 11
5
votes
2 answers

How to get horizontal scroll bars in JScrollPane

I have a panel layout issue that I can't seem to solve. I have the following code: public class Test extends ApplicationFrame { public Test(String title) { super(title); JPanel jpanel = new JPanel(); …
Gavin Miller
  • 43,168
  • 21
  • 122
  • 188
5
votes
3 answers

JfreeChart: Need to remove vertical white lines in stackedareachart

I have created a Stacked area chart. In the chart vertical white lines appear. I need to remove the vertical white lines. How can this be done. An image link is attached.
vegeta
  • 297
  • 1
  • 14
5
votes
3 answers

Transform mouse listener coordinates into chart coordinates

I want to set dots in my app with mouse click. I use JFreeChart and use in ChartPanel mouse listener. This is look like this: panel.addChartMouseListener(new ThisMouseListener()); and my mouse listener ThisMouseListener() (it is not…
Aliaksei Bulhak
  • 6,078
  • 8
  • 45
  • 75
5
votes
2 answers

Dynamically generate JFreeChart in servlet

I'm trying to generate graphs dynamically using JFreeChart as a result of some checkboxes the user selects, but I can't figure out how best to get the generated datasets into chart form (I have code that makes charts from these, but need to produce…
Robert
  • 8,406
  • 9
  • 38
  • 57
5
votes
2 answers

How to disable zoom by mouse dragged without disabling by mousewheellistener in jfreechart?

I would like to disable zooming by mouse dragging(which paints that rectangle), but not disable zooming by MouseWheel. I found in another topic how to disable zoom reset while dragging mouse to left (restoreAutoBounds) and I'm interested in how to…
Bernard Burn
  • 661
  • 5
  • 20
5
votes
1 answer

JFreeChart - XYBarChart Show Separate Bars for Each Series

I'm creating a XYBarChart using JFreeChart and adding multiple series to it. Currently for a given x-value and different Y-values from the series, all of them are getting stacked on top of each other. Would be possible to show each series as a…
Sujay
  • 6,753
  • 2
  • 30
  • 49