How best to work around this limitation ?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
rlenard
Posts: 7
Joined: Thu Jun 10, 2004 4:37 am

How best to work around this limitation ?

Post by rlenard » Wed Jan 19, 2005 7:34 am

I have a CombinedDomainCategoryPlot with a number of subplots in it.

Each of the subplots has their own (different) number axis.

When the plots are aligned horizontally, and the plot axis set to have vertical tick labels (to ensure the axis tick values don't overlap) then the axis labels are not lined up - they move up or down depending on the bounds of the tick labels. This isn't a problem if the tick labels are horizontal (because they have fixed height then), but of course means they can overlap (becoming unreadable).

Looking at NumberAxis.draw() this makes sense because it doesn't have any notion of the alignment of the label - it just draws the labels and then right next to them draws the axis label. However that looks really nasty because the labels move up and down depending on the height of the tick labels :-(

Any ideas ?

Locked