Page 1 of 1

ErrorBar x-value is not positioned correctly

Posted: Fri Dec 14, 2007 4:16 pm
by 10547373
I have in different applications a problem with errorbars. I want to plot dot's (measurement values) with errorbars (measurement uncertainty).
But every time the errorbar is placed just a little bit left of the dot. When I zoom in the distance stay's the same. I am sure that I give the same x value (measurement date/time) to both dot and errorbar. This is my code:

aXValue := Fields[2].AsFloat;
aSeries.AddXY(aXValue, aValue[aUnit], '', aColor);
aErrorSeries.AddErrorBar(aXValue, aValue[aUnit], aUnc[aUnit]);

I think that this must be a bug in TErrorbar.

Posted: Mon Dec 17, 2007 9:55 am
by narcis
Hi Hens,

Would you be so kind to arrange a simple example project we can run "as-is" and let us know the steps we should follow to reproduce the issue here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

ErrorBar Series misplaced

Posted: Thu Jan 03, 2008 6:40 pm
by 10545618
I have also noticed this recently while trying to use the errorbar series. Using version 8 D7 and D2006 Pro.

Dan

Posted: Fri Jan 04, 2008 9:08 am
by yeray
Hi Dan and Hens,

Please, send us a simple example as NarcĂ­s told you because we're not able to reproduce it. For example, the following seems to be fine here:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i : Integer;
Y : Double;
begin
  Chart1[0].Clear;

  for i := 0 to 2 do
  begin
    Y := random * 100;
    Chart1[0].AddXY(i, Y);
    (Chart1[0] as TErrorBarSeries).AddErrorBar(i, Y, Y+20);
  end;
end;