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

How to save current chart in ChartPanel as PNG programmatically?

I have created a JFreeChart in a ChartPanel and I want to save it programmatically. The functionality should exist as it is possible to do this manually (right click menu and PNG option from there). I found the method chartPanel.createImage(??, ??),…
zygimantus
  • 3,649
  • 4
  • 39
  • 54
8
votes
3 answers

Looking for slide bar with two knobs in Java

I am looking for slide bars with two knobs for a user to move them separately or both together, similar to the one in the picture to use in Java. Any sidebar with two knobs (two indicators) would do. Does it exist?
C graphics
  • 7,308
  • 19
  • 83
  • 134
8
votes
1 answer

JFreeChart with SWT

I'm developping a plugin for eclipse and extending the org.eclipse.ui.views extension point. I want to use JFreeChart for drawing some graphics in eclipse view. Is it possible to use JFreeChart with SWT in eclipse view ?
penguru
  • 4,342
  • 11
  • 46
  • 56
8
votes
1 answer

How to display Date in a X-axis of Line Graph using Jfreechart

I am trying to display a Line Graph with Time(HH:MM:SS) as X-axis and Number(as Y-Axis). The read data from "Time" column is of the format HH:MM:SS. The way i am populating dataset from which chart is construted is as follows for (Row row :…
Prashant
  • 1,144
  • 8
  • 17
  • 28
8
votes
1 answer

JFreeChart - Timeseries and CandleStick on the same chart

I'm trying to produce a single chart in JFreeChart that consists of an overlaid candlestick chart and Timeseries plot. (a little like this) I have tried creating the Candlestick chart and adding an additional XY series along with it's it renderer…
Richard B
  • 895
  • 13
  • 39
8
votes
1 answer

JFreeChart domain/range axes defined

Could somebody provide a simple explanation of the JFreeChart axis-types? First, we have the axes that are based on the class hierarchy (ValueAxis, CategoryAxis, lots of subclasses) We also have the "domain axis" versus "range axis" distinction…
lbalazscs
  • 17,474
  • 7
  • 42
  • 50
7
votes
4 answers

How can I put axis on a .png file in java?

I have chart.png with data in it that I would like to put a simple X - Y axis on with some labeling. I also would like to try not to use any external software that doesn't come with java. I'm allowed to use jfreechart but if there is a way to make…
Grammin
  • 11,808
  • 22
  • 80
  • 138
7
votes
4 answers

How to get the coordinates of a point on mouse click with JFreeChart?

I am trying to get the coordinates of the point clicked with the mouse on a scatter plot graph. When you click on a point, "Click event!" and the coordinates are printed on the console. When you click on the "Test" button, "Test" and the coordinates…
Benjamin Crouzier
  • 40,265
  • 44
  • 171
  • 236
7
votes
5 answers

Create stylish charts in Java eg with JFreeChart

What's the best way to create great looking charts in Java? It looks like the main option for charting is JFreeChart, but unfortunately by default they come out looking quite plain. Compare a sample of JFreeChart:…
user1043466
  • 333
  • 1
  • 3
  • 10
7
votes
2 answers

JFreeChart - how to reverse axis order

I'm creating XYPlot and I need to reverse the order on y-Axis (that is, I need lower numbers to be higher on the axis). I would appreciate any hints how to do that.
BeataS
  • 73
  • 1
  • 3
7
votes
2 answers

Jfreechart selection

Is there a way to be able to click on a segment on a plot and have jfreechart tell me the x/y coordinates of that point or somehow return the corresponding data associated with that line? Does jfreechart have any packages at all for interacting with…
z -
  • 7,130
  • 3
  • 40
  • 68
7
votes
1 answer

Draw Fibonacci Arcs

I am attempting to create an application that draws Fibonacci Arcs similar to these. However, I'd like full circles instead of arcs, and I'd like to draw more than the three Fibonacci lines shown in the picture. I've created an application using…
Gabriel
  • 624
  • 1
  • 7
  • 20
7
votes
1 answer

How to make plots in Java like in Matlab (same syntax)

Plotting in Matlab is very easy and straightforward. For example: figure('Position_',[100,80,1000,600]) plot(x,y1,'-.or','MarkerSize',0.2,'MarkerFaceColor','r','LineWidth',2) xlabel('Matrix1') ylabel('Matrix2') grid on hold…
Jayyrus
  • 12,961
  • 41
  • 132
  • 214
7
votes
2 answers

jFreeChart: How to hide items from legend?

I need to hide every second/third/forth item from the legend. IS there a way to achieve this in jFreeChart? thanks!
tzippy
  • 6,458
  • 30
  • 82
  • 151
7
votes
2 answers

JFreeChart : obtain data source value on mouse click

I have a JFreeChart instance that displays process memory status, initialized as follows: m_data = new TimeSeriesCollection(); TimeSeries vmsize = new TimeSeries("VMSize"); TimeSeries resident = new TimeSeries("Resisdent"); TimeSeries shared = new…
Omry Yadan
  • 31,280
  • 18
  • 64
  • 87