change legend's font
-
- Posts: 10
- Joined: Tue Oct 09, 2007 11:12 am
change legend's font
How is it possible to change the legend's font easily?
-
- Posts: 10
- Joined: Tue Oct 09, 2007 11:12 am
no solution to this?
i tried the following -
chart.getLegend().setItemFont(new java.awt.Font("SansSerif",0,20));
But it doesn't work
chart.getLegend().setItemFont(new java.awt.Font("SansSerif",0,20));
But it doesn't work

-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
That works for me. Perhaps you could post a small self-contained demo that reproduces the problem.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 10
- Joined: Tue Oct 09, 2007 11:12 am
Only works on Multiple Pie Chart
var chart = plot.getPieChart();
chart.getLegend().setItemFont(new java.awt.Font("SansSerif",0,20));
The above will work for Multiple Pie Chart. It will set the individual legend's font, but how do i change the overall legend's font?
chart.getLegend().setItemFont(new java.awt.Font("SansSerif",0,20));
The above will work for Multiple Pie Chart. It will set the individual legend's font, but how do i change the overall legend's font?