Hi,
I'm creating a standard Vertical Bar chart and have setLabelsVisible to true. I have also setAutoRange to true also. However, on the chart. the label for the bar which is closest to the highest auto range is always chopped off by the top graph border, the only way to fix it is to set a specific maximum range. Is this a bug or am I forgetting to do something?
Regards
Simon
category labels cut off using autoRange
Re: category labels cut off using autoRange
It's kind of a bug, the sort that arises because JFreeChart is developed by many people in many places.
The axis code is not aware of the fact that the renderer is drawing labels now, so it doesn't make any extra space available when doing the auto range calculation. One thing you can do is change the upper margin on the axis (5% by default). If you make it 10% or 15% then there will be more space for the labels. The method is setUpperMargin(...) in the ValueAxis class (I think).
Regards,
DG.
The axis code is not aware of the fact that the renderer is drawing labels now, so it doesn't make any extra space available when doing the auto range calculation. One thing you can do is change the upper margin on the axis (5% by default). If you make it 10% or 15% then there will be more space for the labels. The method is setUpperMargin(...) in the ValueAxis class (I think).
Regards,
DG.