Page 1 of 1

How to get more than 1 axis label / mark

Posted: Tue Jun 19, 2007 2:39 pm
by 9336311
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

Posted: Tue Jun 19, 2007 2:47 pm
by narcis
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.

Example project files uploaded

Posted: Wed Jun 20, 2007 8:07 am
by 9336311
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

Posted: Wed Jun 27, 2007 11:10 am
by Pep
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.