How to update X and Y of a series value?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
CT
Newbie
Newbie
Posts: 12
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany
Contact:

How to update X and Y of a series value?

Post by CT » Mon Aug 08, 2005 2:41 pm

I need to update a value from the value list of a series. The problem is that I need the new position in the values list. AddXY i.e. returns this position. Now I'm searching for a kind of update function to set the new X and Y values and get the position. Is that possible?

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Aug 08, 2005 3:38 pm

Hi,

several ways. You could use the XValue and YValue methods of the Series to update its values and then use the Locate method to know its position :
Series1.XValue[3] := 50;
Series1.YValue[3] := 150;
i:= Series1.XValues.Locate(50);
ShowMessage(inttostr(i));

or, you can (depending on what you're trying to accomplish) remove the point and add it again with the new values and getting its position :
Series1.Delete(3);
i := Series1.AddXY(50,50,'',clteecolor);
ShowMessage(inttostr(i));

CT
Newbie
Newbie
Posts: 12
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany
Contact:

Post by CT » Tue Aug 09, 2005 6:28 am

Thanks, I will try it.

Post Reply