mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 00:00:16 +02:00
TAChart: Improved Delphi compatibility of TACustomSeries (issue #0023499).
git-svn-id: trunk@46611 -
This commit is contained in:
parent
5bca290b0c
commit
27748dacc4
@ -204,6 +204,15 @@ type
|
||||
function ListSource: TListChartSource;
|
||||
property Source: TCustomChartSource
|
||||
read GetSource write SetSource stored IsSourceStored;
|
||||
public
|
||||
// for Delphi compatibility
|
||||
function LastValueIndex: Integer; inline;
|
||||
function MaxXValue: Double;
|
||||
function MinXValue: Double;
|
||||
function MaxYValue: Double;
|
||||
function MinYValue: Double;
|
||||
property XValue[AIndex: Integer]: Double read GetXValue write SetXValue;
|
||||
property YValue[AIndex: Integer]: Double read GetYValue write SetYValue;
|
||||
published
|
||||
property Active default true;
|
||||
property Marks: TChartMarks read FMarks write SetMarks;
|
||||
@ -672,6 +681,11 @@ begin
|
||||
Result := Source.Count;
|
||||
end;
|
||||
|
||||
function TChartSeries.LastValueIndex: Integer;
|
||||
begin
|
||||
Result := Source.Count - 1;
|
||||
end;
|
||||
|
||||
constructor TChartSeries.Create(AOwner: TComponent);
|
||||
const
|
||||
BUILTIN_SOURCE_NAME = 'Builtin';
|
||||
@ -784,6 +798,11 @@ begin
|
||||
Result := Extent.b.X;
|
||||
end;
|
||||
|
||||
function TChartSeries.MaxXValue: Double;
|
||||
begin
|
||||
Result := Extent.b.X;
|
||||
end;
|
||||
|
||||
function TChartSeries.GetXMaxVal: Double;
|
||||
begin
|
||||
if Count > 0 then
|
||||
@ -797,6 +816,11 @@ begin
|
||||
Result := Extent.a.X;
|
||||
end;
|
||||
|
||||
function TChartSeries.MinXValue: Double;
|
||||
begin
|
||||
Result := Extent.a.X;
|
||||
end;
|
||||
|
||||
function TChartSeries.GetXValue(AIndex: Integer): Double;
|
||||
begin
|
||||
Result := Source[AIndex]^.X;
|
||||
@ -812,11 +836,21 @@ begin
|
||||
Result := Extent.b.Y;
|
||||
end;
|
||||
|
||||
function TChartSeries.MaxYValue: Double;
|
||||
begin
|
||||
Result := Extent.b.Y;
|
||||
end;
|
||||
|
||||
function TChartSeries.GetYMin: Double;
|
||||
begin
|
||||
Result := Extent.a.Y;
|
||||
end;
|
||||
|
||||
function TChartSeries.MinYValue: Double;
|
||||
begin
|
||||
Result := Extent.a.Y;
|
||||
end;
|
||||
|
||||
function TChartSeries.GetYValue(AIndex: Integer): Double;
|
||||
begin
|
||||
Result := Source[AIndex]^.Y;
|
||||
|
Loading…
Reference in New Issue
Block a user