mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 21:55:56 +02:00
TAChart: Allow TUserDefinedChartSource to declare itself sorted.
git-svn-id: trunk@25927 -
This commit is contained in:
parent
6e4ce19314
commit
3bd2cdda8e
@ -194,18 +194,21 @@ type
|
||||
FItem: TChartDataItem;
|
||||
FOnGetChartDataItem: TGetChartDataItemEvent;
|
||||
FPointsNumber: Integer;
|
||||
FSorted: Boolean;
|
||||
procedure SetOnGetChartDataItem(const AValue: TGetChartDataItemEvent);
|
||||
procedure SetPointsNumber(const AValue: Integer);
|
||||
protected
|
||||
function GetCount: Integer; override;
|
||||
function GetItem(AIndex: Integer): PChartDataItem; override;
|
||||
public
|
||||
function IsSorted: Boolean; override;
|
||||
procedure Reset; inline;
|
||||
published
|
||||
property OnGetChartDataItem: TGetChartDataItemEvent
|
||||
read FOnGetChartDataItem write SetOnGetChartDataItem;
|
||||
property PointsNumber: Integer
|
||||
read FPointsNumber write SetPointsNumber default 0;
|
||||
property Sorted: Boolean read FSorted write FSorted;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
@ -922,6 +925,11 @@ begin
|
||||
Result := @FItem;
|
||||
end;
|
||||
|
||||
function TUserDefinedChartSource.IsSorted: Boolean;
|
||||
begin
|
||||
Result := Sorted;
|
||||
end;
|
||||
|
||||
procedure TUserDefinedChartSource.Reset;
|
||||
begin
|
||||
InvalidateCaches;
|
||||
|
Loading…
Reference in New Issue
Block a user