TErrorSeries and Automatic left Axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

TErrorSeries and Automatic left Axis

Post by johnnix » Thu Feb 28, 2008 7:49 am

Hello,

I use TeeChart Pro 8.02. I have a PointSeries with minimum Y value 0.50 and maximum Y value 14.40. The PointSeries left axis is Left only and also the automatic property is set to true. If I only add the PointSeries into the chart everything works fine but if I add another ErrorSeries (where the Y values are taken from the PointSeries) the left axis scales are changed in a dramatic way (minimum set to -23 and maximum set to 50 aprox.). The ErrorSeries appears fine on the chart but I cannot figure out why the scales change so much... Any recommendations?

Regards

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 Feb 28, 2008 8:38 am

Hi johnnix,

I'm not able to reproduce the problem here. 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 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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Post by johnnix » Thu Feb 28, 2008 8:47 am

Hello,

I just uploaded a test project. Notice that the scales in the left axis are not compatible with the Y values of the data.

Regards

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Post by johnnix » Thu Feb 28, 2008 9:00 am

Hello,

The problem is that the axis is scaled based on the error value of the error point. If you add only one error point e.g. series2.AddErrorBar(10,1,5); then you will notice that the left axis minimum is set 1+5 = 6 :(

Is there a way to avoid this???

Regards

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 Mar 04, 2008 12:55 pm

Hi johnnix,

You have 2 options here:

1. Manually set left axis scales:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  series1.AddXY(10,1);
  series1.AddXY(20,2.5);

  series2.AddErrorBar(10,1,2);
  series2.AddErrorBar(20,2.5,1);

  Chart1.Axes.Left.SetMinMax(0,series1.YValues.MaxValue);
end;
2. You can create a custom vertical axis for Series2 and make Left axis not visible.
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