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

How to hide JFreeChart XYSeries yaxis?

Is there a way to hide a JFreeChart XYSeries yaxis? The yaxis is meaningless on logic analyzer display.
jacknad
  • 13,483
  • 40
  • 124
  • 194
13
votes
2 answers

Java JFrame Window not appearing when run from Eclipse

A very simple problem. I try to run a very simple demo to created and display a Window Frame from Eclipse, and nothing happens. No errors, no window, the code runs to completion. I added breakpoints and made sure the code runs as expected. The…
user4061565
  • 545
  • 1
  • 5
  • 16
12
votes
1 answer

Get Area or Elements in zoomed Scatterplot

I've got the following problem. I want to zoom-in a Scatterplot and then select all the displayed elements. It would be sufficient to somehow get the displayed area in the zoomed-in Scatterplot. From the range of this area i could determine which…
dennis
  • 683
  • 2
  • 5
  • 18
12
votes
4 answers

JFreeChart Bar chart custom color?

I am using JFreeCharts in java to create a bar chart. My question is fairly simple... how can I choose a custom color for all of the bars in a bar chart? I'm not sure if this customization would be done in a GradientPaint. An example of my code that…
user3794422
  • 311
  • 1
  • 5
  • 17
12
votes
2 answers

JFreeChart line chart with text at each point

I would like put text over each point I plotted in a line chart. This is what I can do: And this is what I need (names of point are in green):
Alberto
  • 2,881
  • 7
  • 35
  • 66
12
votes
2 answers

JavaFX real-time LineChart with time axis

I'm trying to plot real-time graph, with time axis, but I have found the LineChart constructor only has the signature. LineChart(Axis xAxis, Axis yAxis) I think embedding jfree chart in javafx is not a proper solution. I want a few of the…
Shantanu Banerjee
  • 1,417
  • 6
  • 31
  • 51
11
votes
6 answers

Jfreechart - Refresh a chart according to changing data

I would like to know how to refresh a chart if we want to change "in live" some piece of data. I mean for instance, I have a chart with a TaskSeries which appears on 3 years and I would like to change 3 years by 5 years. I want the chart to change…
Johann
  • 447
  • 2
  • 8
  • 23
11
votes
2 answers

JFreeChart Scatter Plot Lines

I'm trying to create a graph with JFreeChart, however it doesn't get the lines right. Instead of connecting the points in the order I put them, it connects the points from in order of their x-values. I'm using ChartFactory.createScatterPlot to…
hvitedragonfire
  • 113
  • 1
  • 1
  • 5
11
votes
1 answer

jfreechart customize piechart to show absolute values and percentages

How can this compilable minimal code snippet example, which uses JFreeChart as plotting API, adapted in order to show both absoulte values AND percentages? I couldn't extract this information neither from any code snippet on the internet nor from…
kiltek
  • 3,183
  • 6
  • 47
  • 70
11
votes
5 answers

Can JavaFX 2.0 serve as a scientific charting package?

I am writing a scientific experiment control program in java which includes a GUI. I help choosing a charting library for this task. The program will contain two types of charts: A line chart with a lot of data points (in the range of 10^4-10^5…
user1391091
  • 113
  • 1
  • 4
10
votes
1 answer

Basic histogram in JFreeChart

I need to create a simple histogram using JFreeChart. There should be 3 groups with numeric values assigned to each of these groups. The problem is that DefaultCategoryDataset requires specifying "Group" and "Subgroup" (i.e.…
Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217
10
votes
3 answers

Jfreechart: Is it possible to change the bar color?

Is it possible to change the bar color? I have coded a simple program for counting. I want to implement one more thing: if the count number is greater than 200, use blue color to draw the bar. If not, use yellow color to do so. Currently, all bar…
Jfreechart
  • 101
  • 1
  • 1
  • 3
10
votes
1 answer

Add BufferedImage to PDFBox 2.0 document

First time poster, bear with me... I have two questions. First, I want to know how to add an image to a PDFBox 2.0 document using a BufferedImage. The question has been asked here: Add BufferedImage to PDFBox document PDFBox has since excluded the…
vath
  • 153
  • 1
  • 9
10
votes
3 answers

JFreeChart - change SeriesStroke of chart lines from solid to dashed in one line

The answer accepted here (JFreechart(Java) - How to draw lines that is partially dashed lines and partially solid lines?) helped me start down the path of changing my seriesstroke lines on my chart. After stepping through my code and watching the…
MAK Design Labs
  • 346
  • 1
  • 4
  • 16
10
votes
3 answers

Logarithmic Axis Labels/Ticks Customization

I am using the JFreeChart API to generate some chart in my Java application. In one of my charts, I try to use the LogAxis object to make my y-axis a log-scale axis (A in the figure) by the following code: LogAxis logAxis = new…
n0obiscuitz
  • 573
  • 2
  • 10
  • 22