mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 00:40:43 +01:00
TAChart: Implement GetLegendItems for TPolygonSeries.
git-svn-id: trunk@64258 -
This commit is contained in:
parent
94b1982906
commit
7a969539a2
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Graphics,
|
||||
TAChartUtils, TADrawUtils, TACustomSeries;
|
||||
TAChartUtils, TADrawUtils, TACustomSeries, TALegend;
|
||||
|
||||
type
|
||||
TPolygonSeries = class(TBasicPointSeries)
|
||||
@ -17,6 +17,9 @@ type
|
||||
FStart: array of Integer;
|
||||
procedure SetBrush(AValue: TBrush);
|
||||
procedure SetPen(AValue: TPen);
|
||||
protected
|
||||
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
||||
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -145,6 +148,11 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TPolygonSeries.GetLegendItems(AItems: TChartLegendItems);
|
||||
begin
|
||||
GetLegendItemsRect(AItems, FBrush, FPen);
|
||||
end;
|
||||
|
||||
{ Is overridden in order to detect tool events inside the polygon (nptCustom).
|
||||
Otherwise only events on the perimenter would be detected. }
|
||||
function TPolygonSeries.GetNearestPoint(const AParams: TNearestPointParams;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user