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).
Bottom Axis Labels not appearing.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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:
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.
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);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |