Hi,
I was wondering if there is away to rotate the category text in a bar chart. The name of the categories are quit long, which means JFreeChart starts wrapping the text. Instead of wrapping I would like the text to be rotated 90 degrees.
Regards,
Stephen
Rotating category text bar chart
Re: Rotating category text bar chart
Yes, you need to do something like this:
CategoryPlot plot = myChart.getCategoryPlot();
HorizontalCategoryAxis axis = (HorizontalCategoryAxis) plot.getDomainAxis();
axis.setVerticalCategoryLabels(true);
Regards,
DG
CategoryPlot plot = myChart.getCategoryPlot();
HorizontalCategoryAxis axis = (HorizontalCategoryAxis) plot.getDomainAxis();
axis.setVerticalCategoryLabels(true);
Regards,
DG
Re: Rotating category text bar chart
Hi Dave,
Got it to work. Thanks!
- Stephen
Got it to work. Thanks!
- Stephen