Page 1 of 1

BottomAxis labels problem

Posted: Mon Sep 24, 2007 9:13 am
by 9349350
It appears the bottom axis labels size is wrongly calculated.

Create a new window, Add a chart with (eg. Bar) Series.

Set bottom margin to 0 (just for testing)

Go to data pane, edit labels of series

enter aaaaa -> everything is OK :)
enter ABCIIIIIIIIIIIIIIIIIII -> After entering a lot of I's, the A drops of the chart pane. :shock:

There are more character combinations that make it go wrong. used testing font is Arial 8 (the default) :?

Please fix, I have to set margins now which ends up short labels taking a lot of space. :x

(Still Using 7.11 - I can't find a changes doc for 7.12)

Regards,

Hans

Posted: Mon Sep 24, 2007 10:07 am
by narcis
Hi Hans,

This is not a bug, it is just that TeeChart centers the labels to their corresponding tick and if they are too long they don't fit in the given space. A solution to your problem could be using what's shown at the All Features\Axes\Labels\First and Last labels example in the features demo, available at TeeChart's program group.

Posted: Mon Sep 24, 2007 10:53 am
by 9349350
I forgot to mention: I rotate the bottom axis labels 90 degrees.

(Where can I upload a screen shot to?)

Posted: Mon Sep 24, 2007 1:07 pm
by narcis
Hi Hans,

Thanks for the info.

You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Anyway, I could reproduce the problem here and added it (TV52012467) to our defect list to be fixed for future releases.

In the meantime, you can use Chart1.Axes.Bottom.MaxLabelsWidth for calculating dynamically bottom margin.