Bottom Axis Labels not appearing.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Hanodl
Newbie
Newbie
Posts: 1
Joined: Fri May 18, 2007 12:00 am

Bottom Axis Labels not appearing.

Post by Hanodl » Thu Jun 21, 2007 9:30 am

Hi
If you have more than two time based series data and there is data lacking from the second series and second point then the label of the date does not appear on the bottom axis. I have some sample code illustrating this. The point are plotted fine on the graph it is just the label that does not appear; in some cases you can fix this by exchanging the order of the series but then the first series has to have all the date series data, otherwise the label does not display. It seems like the routine to display the label only uses the first series (my guess).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jun 21, 2007 10:49 am

Hi Hanodl,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Yeray
Site Admin
Site Admin
Posts: 9603
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Fri Jun 22, 2007 10:26 am

Hi Hanodl,

First of all note that by default only the labels from the first series will be shown at the bottom axis. Points from other series with x values non-existing in the first series won't have their labels displayed.

We've tested your project and noticed that you enter your X values using an integer called NextCounter and then you assign a label to some of those points introduced. So the points (from series which aren't the first series with labels) will be shown without label associated.

At this point you have two options to achieve displaying labels for all your series:

1) Entering your points using the timedata as X value and not as label and force Bottom axis to show X values. You can do something as follows:

Code: Select all

ActiveLineSeries.Active := True;
                 ActiveLineSeries.XValues.DateTime:=true;
                 OSTGChart.Axes.Bottom.LabelStyle:=talValue;
                 ActiveLineSeries.AddXY(SampleTrendLocalQ.FieldByName('sample_date').AsDateTime,
                           //NextCounter,
                           SampleTrendLocalQ.FieldByName('number_value').Value,'',clTeeColor);
2) Using axes custom labels as you can see in the new features demo, available at Teechart program group. The example is at All Features -> Axes -> Labels -> Custom Labels.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply