font in legend

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

font in legend

Post by Vipin » Fri Sep 27, 2002 3:33 am

Hi,
Sometimes the length of chart legend is too long that it is not able to fit in my window. so, I can see just partial legend.
Is there any way I can change the legend font or make the legend fit in the window?

Thanks,

Vipin

David Gilbert

Re: font in legend

Post by David Gilbert » Fri Sep 27, 2002 3:30 pm

There is a setItemFont(...) method in the StandardLegend class.

StandardLegend legend = (StandardLegend)myChart.getLegend();
legend.setItemFont(someFont);

Regards,

DG

Locked