Page 1 of 1

TErrorSeries and Automatic left Axis

Posted: Thu Feb 28, 2008 7:49 am
by 10046032
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

Posted: Thu Feb 28, 2008 8:38 am
by narcis
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.

Posted: Thu Feb 28, 2008 8:47 am
by 10046032
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

Posted: Thu Feb 28, 2008 9:00 am
by 10046032
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

Posted: Tue Mar 04, 2008 12:55 pm
by narcis
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.