Used this code in the past:
VerticalNumberAxis vnAxis = (VerticalNumberAxis)chart.getPlot().getAxis(Axis.VERTICAL);
vnAxis.setLabelPaint(Color.white);
vnAxis.setTickLabelPaint(Color.white);
vnAxis.setAutoRange(true);
HorizontalDateAxis hdAxis = (HorizontalDateAxis)chart.getPlot().getAxis(Axis.HORIZONTAL);
hdAxis.setLabelPaint(Color.white);
hdAxis.setTickLabelPaint(Color.white);
hdAxis.setAutoRange(true);
Now I get errors (in the latest JFreeChart) compiling because getAxis is no longer a valid method (in the Plot class) ?
Can anyone tell me how to get the axis so that I can set the colors etc?
Thanks,
Erich
getAxis no longer there?
Re: getAxis no longer there?
Never mind. I searched the archive back longer than 30 days (its been a while since I used this forum).
Axis is replaced by getDomainAxis() and getRangeAxis().
I will give these a try.
Axis is replaced by getDomainAxis() and getRangeAxis().
I will give these a try.
Re: getAxis no longer there?
Hi Erich,
You are on the right track with getDomainAxis() and getRangeAxis(). Just keep in mind that getDomainAxis() returns a ValueAxis for the XYPlot class, and a CategoryAxis for the CategoryPlot class.
Regards,
DG
You are on the right track with getDomainAxis() and getRangeAxis(). Just keep in mind that getDomainAxis() returns a ValueAxis for the XYPlot class, and a CategoryAxis for the CategoryPlot class.
Regards,
DG