How to change Vertical Axis Label Font

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Awais Bajwa

How to change Vertical Axis Label Font

Post by Awais Bajwa » Mon Oct 07, 2002 8:17 am

Hello all,
How we can change the font of the vertical Axis Lable font.
Regards
Awais Bajwa.

David Gilbert

Re: How to change Vertical Axis Label Font

Post by David Gilbert » Mon Oct 07, 2002 2:32 pm

Hi Awais,

First you need to get a reference to the axis. Here I will assume you are using XYPlot, but the code is very similar if you are using a CategoryPlot:

XYPlot plot = myChart.getXYPlot();
Axis axis = plot.getRangeAxis();
axis.setLabelFont(...);

Regards,

DG

Locked