How to get more than 1 axis label / mark

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Cyionics
Newbie
Newbie
Posts: 17
Joined: Thu Mar 11, 2004 5:00 am
Location: UK
Contact:

How to get more than 1 axis label / mark

Post by Cyionics » Tue Jun 19, 2007 2:39 pm

Hi
I have a chart from one of our applications.
We are having problems getting the settings for the chart top be able to display a sensible grid and number of labels / ticks for this data.
Could you please indicate the settings we need to do this , we are aware we can add more decimal places but we still end up with only 1 axis label / mark.

This might be related to the fact that the max value plotted is very close to the min, both around 1.1000000xx x10^-8 .

The file can be downloaded from here

www.cyionics.com/chart_with_only_one_left_axis_mark.tee

Rgds
Peter

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

Post by Narcís » Tue Jun 19, 2007 2:47 pm

Hi Peter,

It would be really helpful if you could send us a simple example project we can run "as-is" to reproduce the problem here at news://www.steema.net/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

Cyionics
Newbie
Newbie
Posts: 17
Joined: Thu Mar 11, 2004 5:00 am
Location: UK
Contact:

Example project files uploaded

Post by Cyionics » Wed Jun 20, 2007 8:07 am

Hi

An example file set has been uploaded

teechart_one_axis_label_problem.zip

We have added some hard coded data points to illustrate the problem.

Series1.AddXY (1, 1e-8);
Series1.AddXY (2, 1.001e-8);
Series1.AddXY (3, 1.002e-8);
Series1.AddXY (4, 1.001e-8);



Rgds
Peter

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Jun 27, 2007 11:10 am

Hi Peter,

the problem is TeeChart the minimum axis scale and axis increment values are internally set to 1.0e-10 and 1.0e-11. If you are plotting very small values, the internal algorithm will occasionally fails to calculate (and display) correct axis label. Several workarounds he can use:

1) Draw only factors and ignore the exponents (divide all values with the smallest/largest) exponents. Basically, rescale original values. This way you'll always be plotting relatively "big" values. The only thing left to do is add the smallest exponent value to axis title (or axis labels, depending what you want).

2) If possible, switch to log scale. Of course, this makes sense only if your data is spread over many decades.

Post Reply