TAChart: Add TChartDataItem.SetY with index parameter

git-svn-id: trunk@40175 -
This commit is contained in:
ask 2013-02-04 14:05:31 +00:00
parent c13054e9c5
commit 69598aa313

View File

@ -94,6 +94,7 @@ type
Text: String;
YList: TDoubleDynArray;
function GetY(AIndex: Integer): Double;
procedure SetY(AIndex: Integer; AValue: Double);
procedure SetY(AValue: Double);
procedure MultiplyY(ACoeff: Double);
function Point: TDoublePoint; inline;
@ -430,6 +431,14 @@ begin
YList[i] := AValue;
end;
procedure TChartDataItem.SetY(AIndex: Integer; AValue: Double);
begin
if AIndex = 0 then
Y := AValue
else
YList[AIndex - 1] := AValue;
end;
{ TChartSourceBuffer }
procedure TChartSourceBuffer.AddFirst(const AItem: TChartDataItem);