Menu

#1074 Axis labels are eventually clipped

open
nobody
None
5
2012-11-27
2012-01-20
No

In some situations JFreeChart clips the labels of (vertical, range-) axis.
This depends on the used font-size, the configured padding for the chart and of course the tick untis.

Attached is a self-contained demo that demonstrates the problem with JFreeChart 1.0.14.
See the comments inside the class to work around the problem or make it more obvious.

The bug #925902 may be related to this one. It describles a similar problem but with horizontal clipping of axis labels.

Discussion

  • Martin Höller

    Martin Höller - 2012-01-20

    A self contained demo showing the bug

     
  • Martin Höller

    Martin Höller - 2012-01-20

    A screenshot of a chart with the bug

     
  • Martin Höller

    Martin Höller - 2012-01-20

    Note, that you eventually have to resize the chart window to see the bug.

     
  • David Gilbert

    David Gilbert - 2012-09-23

    In the layout calculations, only the width of the y-axis is adjusted for the size of the labels. The axis is then allowed to draw outside it's bounds at the top and bottom if it needs to, which is where you are seeing this clipping (very often it is not an issue because there is sufficient white-space around the chart). I don't know what is a good solution for this problem.

     

Log in to post a comment.