mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 04:20:55 +02:00
TAChart: Add TListChartSource.SetText and TChartSeries.SetText procedures
git-svn-id: trunk@38732 -
This commit is contained in:
parent
2974002ed0
commit
5c77b8e843
@ -176,6 +176,7 @@ type
|
||||
function GetYMin: Double;
|
||||
function GetYValue(AIndex: Integer): Double;
|
||||
procedure SetColor(AIndex: Integer; AColor: TColor);
|
||||
procedure SetText(AIndex: Integer; AValue: String); inline;
|
||||
procedure SetXValue(AIndex: Integer; AValue: Double); inline;
|
||||
procedure SetYValue(AIndex: Integer; AValue: Double); inline;
|
||||
public
|
||||
@ -854,6 +855,11 @@ begin
|
||||
UpdateParentChart;
|
||||
end;
|
||||
|
||||
procedure TChartSeries.SetText(AIndex: Integer; AValue: String);
|
||||
begin
|
||||
ListSource.SetText(AIndex, AValue);
|
||||
end;
|
||||
|
||||
procedure TChartSeries.SetXValue(AIndex: Integer; AValue: Double); inline;
|
||||
begin
|
||||
ListSource.SetXValue(AIndex, AValue);
|
||||
|
@ -61,6 +61,7 @@ type
|
||||
procedure CopyFrom(ASource: TCustomChartSource);
|
||||
procedure Delete(AIndex: Integer);
|
||||
function IsSorted: Boolean; override;
|
||||
procedure SetText(AIndex: Integer; AValue: String);
|
||||
function SetXValue(AIndex: Integer; AValue: Double): Integer;
|
||||
procedure SetYList(AIndex: Integer; const AYList: array of Double);
|
||||
procedure SetYValue(AIndex: Integer; AValue: Double);
|
||||
@ -521,6 +522,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TListChartSource.SetText(AIndex: Integer; AValue: String);
|
||||
begin
|
||||
with Item[AIndex]^ do begin
|
||||
if Text = AValue then exit;
|
||||
Text := AValue;
|
||||
end;
|
||||
Notify;
|
||||
end;
|
||||
|
||||
function TListChartSource.SetXValue(AIndex: Integer; AValue: Double): Integer;
|
||||
var
|
||||
oldX: Double;
|
||||
|
Loading…
Reference in New Issue
Block a user