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

How do I create and distribute diagonal stripes on a rectangle?

I would like to be able to create bar charts with JFreeChart that looks similar to the following picture. It is a very basic mono-colored bar chart, but with one "fancy" detail: the diagonal stripes. I was thinking that this could be made possible…
oligofren
  • 20,744
  • 16
  • 93
  • 180
5
votes
1 answer

JFreeChart scaling of Boxplots with several Categories

i am currently working on a java-based project using JFreeChart to display boxplots. My Problem is how to display a chart containing boxplots for a CategoryDataset with about 20 Categories and 5+ Series. Currently if the preferred size of the…
dennis
  • 683
  • 2
  • 5
  • 18
5
votes
2 answers

Closing jfreechart swing window closing down the whole application

I have integrated this Jfreechart Bar Demo with my swing application. I have put the following code in the action performed method of a button, this code was previously in the main method of the Bar Demo class. final BarChart3DDemo3 demo = new…
JavaBits
  • 2,005
  • 11
  • 36
  • 40
5
votes
2 answers

Which type of Jfreechart is more suitable for Histograms?

I am working with JFreeChart in order to show a Histogram Chart. My idea is to create a chart with 10 double bars, one bar of the pair in a different color. The 10 values will correspond to 10 weeks, so every week I will have 2 bars representing two…
Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
5
votes
1 answer

Equivalent of createBarChart3D in JFreeChart 1.5.0?

JFreeChart 1.0.19 contained the method ChartFactory.createBarChart3D. That method is not available in JFreeChart 1.5.0. Is there another 1.5.0 method that replaces createBarChart3D? Or is there a workaround (maybe including…
Stefan
  • 2,395
  • 4
  • 15
  • 32
5
votes
1 answer

Change JFreeChart Histogram colors dynamically?

I'm trying to show the histogram of an image and show only some colors. I've already done that with JFreeChart and createXYLineChart and getting all the data by iterating over all pixels. To speed it up I'm trying to do it with "createHistogram".…
nck
  • 1,673
  • 16
  • 40
5
votes
3 answers

Getting the first and last time in milliseconds with Java 8 Time API

I am converting my time calculations from self implemented code to Java 8 Time API. I need to have the start and end time in milliseconds from a java.time.Year or java.time.Month class, which I plan to use later in another layer for JFreeChart. I…
Endery
  • 1,090
  • 17
  • 31
5
votes
1 answer

How to remove outliers(small circle) from Box and Whisker chart in jfreechart

Im using below code to generate box plot chart. But depend on some values it show small circle without drawing the whisker. I need to show whisker not the small circle. Is it possible to hide circle and show the whisker? private void…
Milinda Saranga
  • 205
  • 3
  • 13
5
votes
3 answers

Is it possible to add Legend to the plot in JFreeChart?

I'm trying to add a legend under the plot in scattered chart as shown below. Anyone knows if this is possible? Before: After:
rmartinus
  • 690
  • 1
  • 9
  • 14
5
votes
1 answer

How do I align a graphic in iTextPDF?

I am developing a Java App. I created a pie chart using jFreeChart and added it to a PDF file created with the iText library, but I cannot find a way to align and center the graphic inside the PDF. This is the code I'm using to add the…
Miguel Corti
  • 372
  • 3
  • 16
5
votes
2 answers

Custom graph - Java Swing

I'm trying to create a custom dynamic histogram type bar graph in Java. I've searched a lot but coudn't find a way to achieve this. I'm aware of the JFreeChart library but it doesn't meet my needs. This is what the JFreeChart histogram looks like :…
Chinmay Dabke
  • 5,070
  • 11
  • 40
  • 63
5
votes
1 answer

How to wrap category labels in JfreeChart

I have Stacked Bar Chart created using JFreeChart. The labels of the category are quite big and they overlap with the label of the next Bar. I would like to wrap it to the next line. I did some searching and found that i have to use the below code. …
SKR
  • 779
  • 4
  • 17
  • 31
5
votes
2 answers

Can someone please provide step-by-step instructions for using jfreechart in an IntelliJ project

I cannot get JFreeChart to work in IntelliJ. What I have done so far: Using Win 7, IntelliJ 13.1.4 and Java 1.7 I am relatively new to IntelliJ Started a new project in IntelliJ which creates the default directories root\out and root\src Added my…
Biggsy
  • 1,306
  • 1
  • 12
  • 28
5
votes
2 answers

How can I change the tickLabel on a NumberAxis in JFreeChart?

I am using JFreeChart and want to be able to change the label on the range axis from a number to something more meaningful for the domain I am in. I only see options for customizing the look of the label and no way to override the content of the…
Tony Eichelberger
  • 7,044
  • 7
  • 37
  • 46
5
votes
2 answers

JFreeChart Date axis Formatting issue

I have a time series chart. I have my x-axis as a Date, and the Y-axis are just numbers. I am trying to format the date on the x-axis, however I keep getting exceptions. My code is below: TimeSeries trueSeries = new TimeSeries("True Data"); …
Suraj Kulkarni
  • 207
  • 3
  • 6