Page 1 of 1

Problem with diappearing labels

Posted: Tue Dec 05, 2006 12:14 am
by 9237703
Hi All,

I have a problem with a disappearing label. Initially, tPointSeries is used to display some data:

Image

Then, the user chooses to change it to a bar chart, which invokes only this code:

ChangeAllSeriesType( Chart, TBarSeries );

However, the 4th X-axis label (ABC Chemical Ltd) disappears:

Image

If ChangeAllSeriesType is then used to change it back to a Point series, the label re-appears, and it also appears if changed to a Line series.

Also, this problem is happening on two different PCs, but not on a third, where the label appears OK. So I'm guessing it's a video driver issue. Is there anything that can be done to resolve it (some property setting)? TIA!

Posted: Tue Dec 05, 2006 7:03 am
by Marjan
Hi.

You might try the following things:
1) Decrease the separation between labels. This can be done by setting bottom axis LabelsSeparation property to small value (for example 2):

Code: Select all

tChart1.Axes.Bottom.LabelsSeparation := 2;
2) Another thing you might try is rotate axis labels 90deg anti-clockwise to allow more space for each label:

Code: Select all

tChart1.Axes.Bottom.LabelsAngle := 90;
3) Additionally, you can also experiment with multiline labels or enable the alternate labels:

Code: Select all

tChart1.Axes.Bottom.LabelsAlternate := true;
Using all these tricks you should be able to increase the number of pixels for individual axis label(s).

Posted: Tue Dec 05, 2006 6:32 pm
by 9237703
Thanks, LabelsSeparation did the trick. Interestingly, changing LabelsAngle didn't solve the problem, the angle changed but the label still disappeared!