Left Axis scales problem with very small values (10e-14)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Timo
Newbie
Newbie
Posts: 12
Joined: Wed Jul 11, 2007 12:00 am
Contact:

Left Axis scales problem with very small values (10e-14)

Post by Timo » Thu Aug 16, 2007 2:42 pm

Hi,

I have a problem with the scales of the left axis in a Barchart when the values are very small (here below 1,0*10e-14).

There isn't displayed any scale. It also doesn't help to chose a very small increment (like 1,0*10e-14).

What can i do?

Regards,
Timo

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 Aug 16, 2007 3:05 pm

Hi Timo,

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://www.steema.net/steema.public.attachments 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

Timo
Newbie
Newbie
Posts: 12
Joined: Wed Jul 11, 2007 12:00 am
Contact:

Post by Timo » Fri Aug 17, 2007 7:24 am

Create a new Project with a Chart and use the following oncreate:

Code: Select all

procedure TForm3.FormCreate(Sender: TObject);
begin
  chart1.AddSeries( TBarSeries.Create( chart1 ) );
  chart1.AddSeries( TBarSeries.Create( chart1 ) );
  chart1.AddSeries( TBarSeries.Create( chart1 ) );
  chart1[0].AddXY( 1, 1*power(10,-14) );
  chart1[1].AddXY( 1, 2*power(10,-14) );
  chart1[2].AddXY( 1, 1.5*power(10,-14) );
end;
The bars are displayed correctly, just the markers and the scales are 0
I use TChart Pro 8.01.

Thank you,
Timo[/code]

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

Post by Narcís » Fri Aug 17, 2007 2:32 pm

Hi Timo,

Thanks for the example code.

The problem here is that minimum axis range and minimum axis increment are "hard-coded" into TeeChart sources. Minimum axis range is set to 1.0e-11 and minimum axis increment to 1.0e-12. This is to avoid errors when dividing with small values. To avoid this limitation you can either change TeeChart sources (set these values to smaller value - not recommended) or alternatively manually place labels by using custom labeling. You'll find an example about custom labels at All Features\Welcome!\Axes\Labels\Custom labels in the new features demo, available at TeeChart's program group.
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

Post Reply