How align axis sublabels with there labels

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ev
Posts: 11
Joined: Fri Jan 28, 2005 10:39 am
Location: Stuttgart (DE)

How align axis sublabels with there labels

Post by ev » Fri Mar 11, 2005 10:54 am

I need to have several sublabels for every axis label in my chart.
Every sublable have to be in the new line.
I have created and use MyCategoryAxis extends CategoryAxis (as a copy of ExtendedCategoryAxis with changes)

My createLabel(..) function looks like
...
TextBlock label = super.createLabel(category, width, edge, g2);
...
label.addLine(new TextLine("SUB 1", ...
label.addLine(new TextLine("SUB 2", ...
label.addLine(new TextLine("SUB 2", ...
...
It works fine, I get for example...
LOOOOOONG LABEL
SUB 1
SUB 2
SUB 3
...
Can I get sublabels placed centered to specific label ?
LOOOOOONG LABEL
_____SUB 1
_____SUB 2
_____SUB 3
...
If yes how ?
Thank you !
ev.

ev
Posts: 11
Joined: Fri Jan 28, 2005 10:39 am
Location: Stuttgart (DE)

alignment for sublabes

Post by ev » Tue Apr 12, 2005 10:29 am

... or right aligned ...

LOOOOOONG LABEL
____________SUB 1
____________SUB 2
____________SUB 3
...
Thanks, ev.

Locked