In JFreeChart XYPlot how to change the bar colors - jfreechart

In JFreeChart XYPlot, how to change the bar colors?

Use one of your chosen renderer's setSeriesPaint() methods, as shown in this example and code.

Related

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:

JFreeChart change text color

I have recently implemented a JFreeChart library in my program, but I struggle to change some of the colors of the text, so I can use it in my dark theme. The screenshot below highlights the labels I was not able to figure out how to change the color of.
I am using java swing library with the latest version of JFreeChart and JCommon
If there is any way of changing those colors to some brighter colors, I would be really glad.
Thanks everybody for their answers, I really appreciate any kind of help with this problem. This is the image showing which parts of the chart I want to change the color of the text.
Try setTickLabelPaint() on the Axis that you want.
See all Changing color of labels in JFreeChart.

can we use jfreechart to display an image

Is there anyway to use jfreechart to load and display an image? say some image.png to display on a JPanel using jfreechart so that we can zoomin, zoomout etc?
The ChartPanel class provided in the JFreeChart distribution is the recommmended mechanism for displaying charts in a Swing user interface.

How to change shape of elements in the legend - jFreeChart?

How I can change the shape of elements of legend for jFreeChart without changing the graphs of diagrams ?
I have ready time series diagram. I need to update the existed data markers in legend to the simple line with defined colors.
Start by not adding a LegendTitle to your chart. This is usually a controlled by a parameter to your ChartFactory or your JFreeChart constructor. Both CategoryPlot and XYPlot have a setFixedLegendItems() method, mentioned here, that you can use to add a collection of arbitrary legend items.

Customize subtitle position - JFreeChart

I want to know if it is possible to put a JFreeChart subtitle in the bottom of the chart, under the chart, and not under the Title.
What I want to do is illustrated on these images:
http://i.stack.imgur.com/AmPJ8.jpg
and
http://i.stack.imgur.com/VBfvL.jpg.
I just tried almost everything and cannot do this.
I am using subtitle insted of legend, because legend is presented with a red square, indicating the color of the series shown on the graphics.
Thanks in advance!
Joey
In this example, the following TextTitle appears to work.
chart.addSubtitle(new TextTitle(new Date().toString(),
new Font("Dialog", Font.ITALIC, 14), Color.black,
RectangleEdge.BOTTOM, HorizontalAlignment.CENTER,
VerticalAlignment.BOTTOM, RectangleInsets.ZERO_INSETS));

Resources