Hi,
I want to use Vertical bar chart with decimal numbers.
Legends in horizontal axis are often overlapping as the size of the chart is 'normal' (not full screen)?
Do you know how to display these figures vertically ?
(I know it was possible with previous versions so I think it 's still possible !)
Do you have a better idea to avoid overlapping ?
thanks
How to change legend label orientation ?
Re: How to change legend label orientation ?
This should do it:
HorizontalCategoryAxis axis = (HorizontalCategoryAxis)plot.getHorizontalAxis();
axis.setVerticalCategoryLabels(true);
One suggestion someone made to avoid overlapping is to clip the labels, printing '...' at the end of strings that have been clipped (and for screen-based charts, use tooltips to show the full name). That's the best suggestion I've heard so far, though I've not had the time to do anything about it yet.
The other thing you can do is make sure that your categories really are categories. If they are dates, then you might be better off using the VerticalXYBarPlot class with a TimeSeriesCollection (implements IntervalXYDataset) for your dataset.
Regards,
DG.
HorizontalCategoryAxis axis = (HorizontalCategoryAxis)plot.getHorizontalAxis();
axis.setVerticalCategoryLabels(true);
One suggestion someone made to avoid overlapping is to clip the labels, printing '...' at the end of strings that have been clipped (and for screen-based charts, use tooltips to show the full name). That's the best suggestion I've heard so far, though I've not had the time to do anything about it yet.
The other thing you can do is make sure that your categories really are categories. If they are dates, then you might be better off using the VerticalXYBarPlot class with a TimeSeriesCollection (implements IntervalXYDataset) for your dataset.
Regards,
DG.