Changing vertical axis label font???

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

Changing vertical axis label font???

Post by mel » Wed Aug 21, 2002 10:16 pm

Hi,

I'm having trouble changing the font size of the vertical axis label in the vertical bar chart. (I am converting my chart to jpg format, but the axis label is not completely vertical...so maybe a smaller font will work better??)

If anyone has any suggestions that would be much appreciated.

Thanks in advance

Melissa

David Gilbert

Re: Changing vertical axis label font???

Post by David Gilbert » Thu Aug 22, 2002 10:35 am

You can change the font like this:

CategoryPlot plot = myChart.getCategoryPlot();
ValueAxis rangeAxis = plot.getRangeAxis();
rangeAxis.setLabelFont(new Font(...));

Can you send me an image showing the rotated text? I've heard of a bug in one of the JDKs where text is not rotating properly, perhaps this is what you are seeing.

Regards,

DG

Locked