Page 1 of 1

How to update X and Y of a series value?

Posted: Mon Aug 08, 2005 2:41 pm
by 8439897
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?

Posted: Mon Aug 08, 2005 3:38 pm
by Pep
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));

Posted: Tue Aug 09, 2005 6:28 am
by 8439897
Thanks, I will try it.