Hi,
I need to highlight selected series in XY line chart legend using bold font (highlighting lines using thicker ones works correctly). I've implemented ChartMouseListener so I can get LegendItemEntity and then LegendItem (from chart). I've tried to use method setLabelFont but the legend font is not changed.
Can you help me, please?
Selected XY series legend item font
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
In JFreeChart 1.0.11, you should be able to use the following method in the renderer to set the legend item font:
It wasn't available prior to version 1.0.11.
Code: Select all
public void setLegendTextFont(int series, Font font);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

