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

JFreeChart: How to put arrows at the end of axis lines in scatter plot

I have the following plot: How do I put arrows at the end of leadership line and performance line? Here is a demo code: import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import…
dovahkiin
  • 708
  • 14
  • 34
1
vote
1 answer

Updating JFreechart dataset with timer

I found an example about multiple charts here, and try to improve it a little bit. I want these values to be changed with time. Here is the code: import java.awt.Color; import java.awt.EventQueue; import java.awt.GridLayout; import…
AloneInTheDark
  • 938
  • 4
  • 15
  • 36
1
vote
1 answer

Stop Swing components relocating to initial coordinates upon ChangeEvent?

I have some movable objects (JLabels) and the user will reposition them within the parent ChartPanel during runtime. To move the objects I've implemented the (really helpful) ComponentMover class, found here:…
josahe
  • 13
  • 4
1
vote
1 answer

jFreeChart custom bar colors error from tutorials

I've been looking everywhere to know how to change each bar color because I do not like the gradient setting of the default bar colors. They all suggested overriding the BarRenderer with more or less the code below: class CustomRenderer extends…
P A S T R Y
  • 351
  • 3
  • 20
1
vote
1 answer

Which JFreeChart is the easiest to use for representing simple line and bar charts

The data I am trying to represent in my charts will usually be shown with timestamps (dates and times) going along the bottom, or x axis, and a variety of data (which will always be simple integers or maybe float data in the future) shown on the…
dahui
  • 2,128
  • 2
  • 21
  • 40
1
vote
2 answers

Get the Following Coordinate In JFreeChart

I wish to get the following coordinate in JFreeChart. I try to use chartPanel.getScreenDataArea() But, it is not the area I want. The returned rectangle is outside the area I wish to have. The coordinate I wish to have is being marked as ??? in…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
1
vote
1 answer

How to adjust the xand y axis line in jfreecharts

In my jfree line chart the x and y axis line is drawn seperated.. I need to get both the axis meet at the orgin. Here is the Actual Image im getting from jfree line chart How to join the two axis line at the orgin in jfree line chart... I've…
Hariprasath
  • 828
  • 4
  • 15
  • 41
1
vote
1 answer

JFreeChart Gantt Chart different colors for subtasks depending on description

I'm trying to display my logs in a Gantt Chart. Each log is represented as a Task and each Task has 7 subtasks, which represents the partiall timings. The subtasks are to be shown in the chart if their value is not 0 (otherwise they won't be…
user3006009
  • 103
  • 1
  • 2
  • 9
1
vote
1 answer

JfreeChart not displaying before a click

I have built an display a TabPanel. At this stage no Chart is displayed .When I click on a button, I build a new chart an add it to the panel. But nothing happens. I have to click on the panel to have the chart displayed at last. So I put a…
user3239711
  • 639
  • 1
  • 7
  • 24
1
vote
1 answer

How to display current time in DynamicTimeSeriesCollection in Jfreechart?

In my application i want to display current time in X axis of JFreechart. But it starts with 00:00:00 . But actually i want like 06:15:30PM I am setting timebase like this, final DynamicTimeSeriesCollection dataset = new…
A.Mohamed Bilal
  • 115
  • 1
  • 13
1
vote
2 answers

Value is getting multiply by 100 when using percentage on value axis bar chart JfreeChart

I am using JfreeChart 1.0.15 library. I want to show percentage score of the college and branches, so I used setNumberFormatOverride() method final NumberAxis valueAxis = new NumberAxis("Percentage…
Aniket Kulkarni
  • 12,825
  • 9
  • 67
  • 90
1
vote
1 answer

Obtain JFreeChart data using Data Access Object & Servlet

My goal is to generate Bar Chart using Java so I searched for a library which could do it. Soon I found JFreeChart library and downloaded it from here. The tutorial given is data is hardcode. So as my example. However, I am trying to obtain…
newbieinjavaversion2
  • 489
  • 5
  • 12
  • 23
1
vote
1 answer

JFreeChart different fonts or font sizes in title

Is it possible to use different fonts or font sizes in the title of a JFreeChart object? Using: chart.getTitle().setFont(new Font("Tahoma", Font.PLAIN, 16)); allows one to set the font but I am trying to create a bold, large font-size title…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
1
vote
1 answer

Changing the range axis on JFreeChart GanttChart - SegmentedTimeline for non-working hours

I hope i will be able to get my message across in the right way and tell you what is that i am looking to achieve. I am using JFreeChart GanttChart in my Swing application to display the scheduling of tasks. Was able to prepare the right dataset and…
Napster
  • 157
  • 3
  • 17
1
vote
1 answer

JFreeChart 2D functions plotting with custom functions defined by user

I am trying to add function plotting to my Java Swing application. From my main app window I want to launch a JDialog with a simple JLabel = "f(x) = " and a JTextField, where user would be asked to enter their own function they want to plot. I am…
Asunez
  • 2,327
  • 1
  • 23
  • 46