How to update X and Y of a series value?
How to update X and Y of a series value?
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?
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));
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));
Pep Jorge
http://support.steema.com
http://support.steema.com