diff --git a/components/tachart/tacustomsource.pas b/components/tachart/tacustomsource.pas index 982fcc5b7d..0c8c536101 100644 --- a/components/tachart/tacustomsource.pas +++ b/components/tachart/tacustomsource.pas @@ -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);