How to change font size for Legend, can someone help please?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
SLizer3D
Posts: 2
Joined: Tue Aug 15, 2006 3:40 pm

How to change font size for Legend, can someone help please?

Post by SLizer3D » Tue Aug 15, 2006 3:44 pm

I do need to set the font size for the pie chart Legend, is there any way to do that?

Thanks!

Lochin.

pmlb
Posts: 31
Joined: Thu Aug 25, 2005 5:18 pm
Location: France

Post by pmlb » Wed Aug 16, 2006 12:28 pm

Hi Lochin,

Try something like:

Code: Select all

LegendTitle lt = chart.getLegend(); 
lt.setItemFont(new Font("Arial", Font.PLAIN, 8));
Pierre-Marie

SLizer3D
Posts: 2
Joined: Tue Aug 15, 2006 3:40 pm

Post by SLizer3D » Thu Aug 17, 2006 12:24 pm

Thanks a lot pmlb :)
it did Work!

seems lik I was using oler version of jfreechart, I had to change it to 1.0.1

Lochin.

Locked