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).
2,712
questions
1
vote
1
answer
26
views
How to remove connection/line between end points in jfree polar chart?
I want to remove the straight line which is connecting the end points of the polar graph. It is not the part of dataset. I have also tried by inserting Double.NaN but results were not satisfiable, it ...
0
votes
0
answers
65
views
JFreeChart show one single value
I have a chart where I display the values of a table (stock and date). The stock is displayed in the y axis and the dates in the x axis.
As long as the query returns 2 entries, it is shown normally as ...
1
vote
1
answer
21
views
Change axis label Color (JFreeChart)
Can anyone tell me how I can proceed to change the color of the axes' labels as circled below?
1
vote
1
answer
65
views
JFreeChart alternate background color
I'm trying to set two colors that need to be switched at every vertical tick label as background of a JFreeChart linechart.
I want the line chart to appear as the image in this link, where two ...
1
vote
1
answer
34
views
JasperSoft Studio (6.8), custom and dynamic color for a pieChart element
I'm using JasperSoft Studio version 6.8. I'm trying to create a pieChart with dynamic colours. I would want each label ('Verificata dal cliente', 'Aperta', 'Situazione invariata', etc...) to always ...
0
votes
0
answers
26
views
jfreechart bar color difference issue
arrayOfPaint[i] = new GradientPaint(0.0F, 0.0F, Color.green, 0.0F, 0.0F, Color.green);
// arrayOfPaint[i] = new GradientPaint(0.0F, 0.0F, Color.red, 0.0F, 0.0F, Color.red);
}
...
1
vote
1
answer
53
views
Dual JFreeChart not running; only one running
Please let me know how I can make a program for JFreeChart in a JFrame. There are two JFreeCharts and both are visible, but only one is running; the other is still, why it is happening? Is there any ...
1
vote
1
answer
37
views
JFreeChart issue with dates
Hello I am unable to display the dates in a JFreeChart. However the dates are included in the TimeSeries. Here's what I see in the debugger:
But the only thing I can see is the following:
Here's my ...
1
vote
1
answer
54
views
How to keep an icon in one side of a chart in JFreeChart Java
I have the following chart:
The chart is dynamic and has the capability of make zoom in and zoom out.
I want to put an icon that is created as:
BufferedImage triangleIcon = null;
try {
...
-1
votes
1
answer
70
views
Dynamic JFreeChart for custom X-Axis values [duplicate]
I make a JFreeChart for displaying values from serial port. It is working well, but I want to make X-axis movable from right to left. It means when plotting the graph, custom values or seconds move ...
0
votes
1
answer
39
views
Position x axis labels on top left and right
I have a dual axis jfreechart which has two x axis. By default the axis labels are appearing horizontally, I wanted to display them at the top left and right.
0
votes
1
answer
57
views
How to update chart after selecting item from JComboBox?
I'm trying to change the values of bar chart depending on the selected item from the combobox list. The code below is a short example. The method for creating/updating the chart works well with button ...
0
votes
0
answers
25
views
PDFbox jfreechart is blurry
I am trying to save jfreechart in pdf using PDFBOX.I am using PDImageXObject to save the chart as png and place it inside PDF using PDPageContentStream(PDFbox version :2.21.0). The problem is when it'...
0
votes
0
answers
18
views
Crosshair label over axis with JFreeChart
JFreeChart draws the crosshair label inside the chart area, but is it possible to draw it on the axis instead? It would look like this:
2
votes
0
answers
69
views
How to create a dual X-axis chart with jfreeChart? Timeline with sprint names
I'm struggling with the dual X-axis chart with jfree chart. After a few trials with a chart customizer it still doesn't work. I would like to have events based labels on the axis that are in my ...
1
vote
1
answer
37
views
How can I order columns in a box chart in JFreeChart?
I have a box chart with multiple boxes in rows and columns. The ordering of the boxes is wrong. Each row (color) is labeled by an enum constant of type Multiple, and each column (group) is labeled by ...
0
votes
1
answer
48
views
JFreeChart and PDFbox
How to add JFreeChart as png/jpeg in PDFBox? I tried using PDXObject image, but its not available in version 1.8.11 which is currently used in the project. Kindly help me with the sample code and ...
0
votes
0
answers
27
views
How to prevent candlesticks from overlapping eachother?
I'm trying to plot the candles without them overlapping eachother like in the added image.
I played around a bit with the domain range but i'm having trouble figuring out how to keep/set a minimum ...
2
votes
1
answer
58
views
How to adjust Image position in XYImageAnnotation
I have a icon in JFreeChart:
BufferedImage torreIcon = null;
try {
torreIcon = ImageIO.read(getClass().getClassLoader().getResource(
"Resources/Imagenes/torre_control_2.png"));
...
0
votes
0
answers
39
views
Error compiling ChartUtilities.saveChartAsJPEG()
I get this error:
ChartUtilities.saveChartAsJPEG(new File(path), chart, 300, 300);
The method saveChartAsJPEG(java.io.File, org.jfree.chart.JFreeChart, int, int)
in the type ChartUtilities is not ...
0
votes
0
answers
74
views
Create a graph paper background in JFreeChart
I am using JFreeChart library to plot an ECG signal. I'm using the XYLineChart, and this is how it looks currently.
However, I want to have a graph paper background, made out of 5x5 squares, like on ...
0
votes
0
answers
9
views
Put the same label in several intervals in JFreeChart
I want to make a bar chart in JFreeChart that has a structure similar to the following:
As you can see, it starts with "Clay", then "Sand", then "Clay" again, and so on.
...
0
votes
0
answers
30
views
How to move a xyplot with the movement of an icon with jfreechart in java
I have an xyplot where I have an icon and several plots that you can ignore. The following picture shows the initial view of the chart.
The icon has movement, and does something like:
The icon path ...
0
votes
0
answers
17
views
how to add text to jfree polar plot?
Starting from the java code below , is there a way to add text on jfree plot ?
The aim is to obtain a plot like posted with "aa" "bb "cc" .
"filling text ....................
0
votes
0
answers
11
views
how to add circular graduations otherwise circles to polar plot?
Starting from the code below , is there a way to add graduation to plot ?
the aim is to obtain a plot like posted.
i found addannotation for linechart plot but not for polar ...
Thank you
package ...
1
vote
1
answer
56
views
how to change dot shape with jfree polar plot?
I would like to know what are the methods to use to change dots polarplot size and shape .
And also if it's possible to disable dots for this type of plot .
here is the code plotting polar of two ...
1
vote
1
answer
68
views
How to combine two polar charts?
I founded a very interesting code that allows to combine two differents charts.
I would like to do the same with two polar charts to permit multiple scale, but there is no renderer as line and shape ...
1
vote
1
answer
43
views
Error: This dataset already contains a series with the key Object 1
Background: I am adding x & y values to a XYSeries dataset so I can render a jfreechart. Each of the x and y values are read in from a text file and are doubles. I've set the x and y values equal ...
0
votes
0
answers
19
views
How to use JFreeChart in a java ant project? [duplicate]
EDIT: After looking into this for several hours I decided to switch to Maven, making this question irrelevant. The switch for my project wasn't too hard for the code, hopefully the last bit stays ...
0
votes
0
answers
18
views
How can I read all values on crossline in JFreeChart? [duplicate]
I have a linechart and I am reading the values of lines with moousemovement event but I can only read only one line value with crossline. My mouse is on purple line right now. I want to read all ...
0
votes
0
answers
41
views
Why some text has underline, but others don't in JFreeChart?
I have asked a few questions about JFreeChart before, so there is a simple demp app, but I have noticed some text will have an underline, but others don't, as seen in the following image, why ? How to ...
0
votes
0
answers
27
views
How to convert LocalTime to RegularTimePeriod? [duplicate]
I am plotting a linechart with JFreeChart. X axis of the linechart should be time and I want to get this time as a string like "08:20:20,19". When I am trying to convert LocalTime to ...
1
vote
1
answer
81
views
How to highlight a section in JFreeChart?
My sample code looks like the following :
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
import org.jfree.chart.*;
...
1
vote
2
answers
47
views
How to get X pixel value from date index or string in JFreeChart?
I have the following sample app :
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
import org.jfree.chart.*;
import org....
0
votes
0
answers
43
views
Reduce the area of a MeterPlot chart with JFreeChart
I'm creating a graph with MeterPlot in which I need 6 static values. It turns out that the graph cuts the top part and the part of the sides; how do I reduce that area? I already tried with this:
...
0
votes
0
answers
54
views
How to get X coordinate value from JFreeChart? [duplicate]
My sample code looks like this :
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
import org.jfree.chart.*;
import org....
1
vote
1
answer
79
views
Gantt chart: freeze legend and axes when scrolling
In the chart factory and I use there SlidingGanttCategoryDataset. But the scrolling does not appear. What am I missing?
public JFreeChartGanttChart(String applicationTitle, String chartTitle) {
...
0
votes
1
answer
70
views
JFreeChart how to manually add the legend into plot graph
I have used JFreeChart library in java to draw one line with points ie. plot.
The points have two kind of color - green or blue. Below is some sample with different colors.
I would like to display two ...
0
votes
1
answer
38
views
Change color of item labels on range on Category chart
I want to change the color of labels showing in black, but I am unable to find a solution.
I tried using below code, but it has no effect
CategoryAxis yaxis = plot.getDomainAxis();
yaxis.setLabelPaint(...
0
votes
0
answers
28
views
How can I locate the check boxes in JFreeChart?
I am trying to locate checkboxes in JFreeChart and also I want to manage them in a combo box. How can I locate them and then how can I make them in combo box?
My checkboxes look like this:
As I said ...
1
vote
1
answer
110
views
How to ignore certain field of a third party class when deserializing with Jackson?
I've got a class which contains field from JFreeChart, like XYPolygonAnnotation which contains itself Paint and Stroke.
I can serialize it easily using an ObjectMapper. But when I try to deserialize ...
0
votes
0
answers
25
views
How can I show values of XYLineChart with popup? [duplicate]
I have an XYLineChart in JFree and I have a graph. I want to show the values of lineChart with popup at any point of the line. I did some research about this subject but I couldn't find something to ...
0
votes
0
answers
31
views
How to draw different limit lines for different domain in JFreechart?
We are using ValueMarker to draw limit lines on the chart (line 1 and 2). How can we draw something like line 3?
I found following ways which are close to what I want but if there is better way to ...
0
votes
1
answer
32
views
How can I find the name of axis in multiple range axis JFreeChart?
I have 3 variables in Y axis and I am trying to get the name of the axis according to value which I look for.
.
Variables are attached here. I can get the value of the variable with label, but I can't ...
1
vote
1
answer
97
views
How to change JFreeChart vertical bar to a solid color?
I have the following sample code for a JFreeChart, how to change the vertical bars to a solid color [ right now it has some white color in each bar ] ?
import java.awt.event.*;
import java.text....
0
votes
0
answers
50
views
How can i get mouse cursor value in Java Chart? [duplicate]
I try to get mouse cursor values in Java Chart. I have two variables on Y axis and I have one variable on X axis. My y axis variables looks like: enter image description here and I use crosshair to ...
1
vote
1
answer
152
views
Change the font size of the y-axis and x-axis values
In the following code, I want to reduce the font size of the y-axis and x-axis values.
I searched and found these code:
suppose you want to reduce the font size of number axis use the following code:
...
1
vote
1
answer
28
views
JFreechart href action not properly (missing serie and X item) generated with a XY line chart
I've a XY Line chart properly generated but I'm facing the following issue:
There HREF action generated changes the value fetched from the query and displays their array position. Therefore, the ...
0
votes
2
answers
321
views
How to create a gauge chart using JFreeChart
I want to create a gauge chart using a combination of pie chart and half donut chart. The expected image is attached.
Can someone please help me to modify the attached code to get the expected result? ...
0
votes
2
answers
152
views
JFreeChart Fixed range axis ticks
I am trying to generate a line chart but I cannot figure out how to
a) setup the range axis with fixed ticks for 0.001, 0.01, 0.1, 1, 10 and 100
b) display only those ticks in the graph
c) Custom ...