Hello,
i wonder to know how can we choose the color of the axis and how to change the color of the line we draw in a graph XYLineChart
thanks a lot
change axis color and line color on a XYLineChart
See point 6 of the FAQ
for changing the axis colours, have a look at the javadocs for
and their associated subclasses.
You will need to have a look at the methods:
in general their usage is
for Red, Green, Blue and Alpha (transparency) values as int. The Alpha value is optional
6. I want to set my own colors for each series in my chart. How do I do that?
for changing the axis colours, have a look at the javadocs for
Code: Select all
org.jfree.chart.axis.Axis
org.jfree.chart.axis.CategoryAxis
org.jfree.chart.axis.ValueAxis
You will need to have a look at the methods:
Code: Select all
setTickLabelPaint
setTickMarkPaint
setAxisLinePaint
setLabelPaint
Code: Select all
set...Paint(new Color(R, G, B, A))