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
6
votes
3 answers

Higher Quality of JFreeChart charts

I want to embed a PNG of a chart which I created with JFreeChart into a PDF document. The problem here is, that the quality of the chart is very poor. My goal is to have PNGs with 300 DPI. I googled for almost an hour now but I could not find a…
Dominik Obermaier
  • 5,610
  • 4
  • 34
  • 45
6
votes
1 answer

JFreeChart: Preserve zoom position when updating chart

My program creates a time series chart using JFreeChart (via Swing ChartPanel) and allows the user to zoom into it (using the ChartPanel's standard zoom feature). The program has parameters (such as smoothing) that can be tweaked at runtime; if…
Maximilian
  • 127
  • 7
6
votes
2 answers

How to change the axis value font on a JFreeChart

Just as the title says, if I have a JFreeChart (or want to create one) how do I specify the font that is used for the values on the axis? Not the axis label, but the actual values. Specifically I just want to make the font a little bigger.
chris
  • 1,731
  • 4
  • 26
  • 33
6
votes
1 answer

Remove labels from JFreeChart Pie Chart

public static JFreeChart createChart(String title, List results){ DefaultPieDataset pieDataset = new DefaultPieDataset(); Iterator itr = results.iterator(); while (itr.hasNext()) { Result result = itr.next(); …
Darth Blue Ray
  • 9,445
  • 10
  • 35
  • 48
6
votes
3 answers

JFreeChart & Image

Is it possible to cast an image/BufferedImage to JFreeChart?
Suma
  • 105
  • 1
  • 2
  • 8
6
votes
3 answers

Does jFreeChart work/comple in Android 2.x

Does jFreeChart compile and run in Android 2.2 or above? I tried to run it and received missing swing class errors. There does not seem to be any definitive answer on the web. The answer to this question is either 1) Yes, I use it all the…
fishjd
  • 1,617
  • 1
  • 18
  • 31
6
votes
0 answers

Overlapping of Multiple IntervalBarRenderer

This example demonstrates how to avoid overlapping multiple bars on dual axis by adding null series at each data set. By following the example I have created four DefaultIntervalCategoryDataset objects, each on its own separate axis (the complete…
Faisal Bahadur
  • 498
  • 3
  • 19
6
votes
1 answer

How to display a JFreeChart in a NetBeans project

This is similar to a question I asked yesterday but more specific to the problem. What is the correct method to add a JFreeChart to a NetBeans project which already contains various widgets? My updateChart() hides the entire JFrame. I'd like to add…
jacknad
  • 13,483
  • 40
  • 124
  • 194
6
votes
1 answer

JFreeChart: is it possible to combine a stacked bars and line chart combined?

As in this mockup: I know it is possible to have charts display next to each other using org.jfree.chart.plot.CombinedDomainXYPlot, but is it possible to have them overlaid, possibly using different Y axes (one for the stacked bars to the left of…
avernet
  • 30,895
  • 44
  • 126
  • 163
6
votes
1 answer

Make a custom ring chart in JFreeChart

I am currently using itext-pdf to generate PDFs. In addition to that, I am also using JFreeChart to create charts on it. I have created a donut chart with a explosion effect and it looks like this. However I want to create a donut chart that looks…
user1010101
  • 2,062
  • 7
  • 47
  • 76
6
votes
1 answer

Mapping JFreeChart Series Name to Series Index

I'm plotting a TimeTableXYDataset using a StackedXYBarRenderer. Unfortunately the colours of each series change on refresh. I know how to set colours using the setSeriesPaint method of the renderer, but that takes an integer series index as the…
Adrian Cox
  • 6,204
  • 5
  • 41
  • 68
6
votes
1 answer

How to update/refresh JPanel on JButton click?

I am trying to plot a graph and graph should display when JButton is clicked. To create data set, I am taking some value through JTextField and then created a chart and plotted it. I've got 2 problems: The chart becomes visible after resizing the…
Ranjeet
  • 360
  • 2
  • 4
  • 13
6
votes
4 answers

Plot points instead of lines? JFreeChart PolarChart

Currently, the PolarChart joins all the coordinates with lines creating a polygon. I just want it to plot each point with a dot and NOT join them together. Is this possible? I have tried using translateValueThetaRadiusToJava2D() and Graphics2D to…
MSpeed
  • 8,153
  • 7
  • 49
  • 61
6
votes
2 answers

JFreeChart: set line colors for XY Chart - 4 series, 2 datasets, dual axes

I can't seem to set individual line colors for all four lines. When I use the lines: plot.getRenderer().setSeriesPaint(0, new Color(0x00, 0xFF, 0x00)); plot.getRenderer().setSeriesPaint(1, new Color(0x00, 0x00, 0x00)); (In the code below), it…
Jodes
  • 14,118
  • 26
  • 97
  • 156
6
votes
2 answers

To change the X-axis starting value of graph in Jfreechart

I am calculating histogram of red component of the image and stored it in redhisto[]. The index of the array represent the intensity(0 to 255) and the value represent the number of pixel with that intensity. Then plotting those values with…
Kailash
  • 642
  • 2
  • 9
  • 15