Problem with diappearing labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
SidG
Newbie
Newbie
Posts: 2
Joined: Mon Jul 11, 2005 4:00 am
Location: Denver, Colorado, USA
Contact:

Problem with diappearing labels

Post by SidG » Tue Dec 05, 2006 12:14 am

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!

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Dec 05, 2006 7:03 am

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).
Marjan Slatinek,
http://www.steema.com

SidG
Newbie
Newbie
Posts: 2
Joined: Mon Jul 11, 2005 4:00 am
Location: Denver, Colorado, USA
Contact:

Post by SidG » Tue Dec 05, 2006 6:32 pm

Thanks, LabelsSeparation did the trick. Interestingly, changing LabelsAngle didn't solve the problem, the angle changed but the label still disappeared!

Post Reply