Hi,
I have a LegendTitle with a number of categories which have long descriptions (Which are required). It is possible to reduce the width of the Legend title and wrap the corresponding LegendItem text?
I've tried to set the size of the LegendTitle by using the setWidth method however it doesn't seem to have any impact on the width.
Thanks
Jason.
Wrapping of LegendItem Text
There doesn't seem to be a way for the legend to wrap text based on maximum width. However I found that you can put a '\n' character within the label to make the label split onto a new line.
e.g if you have legend label
"Cumulative Budget (Current Authorised)"
if you insert '\n' character
"Cumulative Budget\n (Current Authorised)"
The legend label is split over two lines
Cumulative Budget
(Current Authorised)
e.g if you have legend label
"Cumulative Budget (Current Authorised)"
if you insert '\n' character
"Cumulative Budget\n (Current Authorised)"
The legend label is split over two lines
Cumulative Budget
(Current Authorised)
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I'm still planning to do more work on the legend layout options. I think setting a maximum width to force wrapping would be a nice option to have.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


any news for that
are ther now improvements for that?