Reputation: 5947
I've got legacy code sample which uses JFreeChart and XYPlot. Now i'm making i18n for that code and most of non-english strings are much longer then english ones. I googled for a way to wrap strings. No success. Help please!
Upvotes: 3
Views: 2996
Reputation: 404
Try using setMaximumCategoryLabelLines
method from CategoryAxis
, e.g:
CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setMaximumCategoryLabelLines(3);
Upvotes: 11
Reputation: 205785
Multiple lines are not supported. The setVerticalTickLabels()
method may be applied to either a domain or a range axis. Because space is limited, interpreters should be frugal. Providing a user setting, as shown here, may mitigate the limitation.
Upvotes: 2