mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-24 03:59:13 +02:00
TAChart: Minor cleanups:
Move ShowInLegend initialization into TCustomChartSeries. Add empty override for TUserDrawnSeries.GetLegendItems. git-svn-id: trunk@21900 -
This commit is contained in:
parent
73ae5dc715
commit
33343e7d67
@ -133,6 +133,7 @@ constructor TCustomChartSeries.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FActive := true;
|
||||
FShowInLegend := true;
|
||||
end;
|
||||
|
||||
procedure TCustomChartSeries.SetActive(AValue: Boolean);
|
||||
@ -233,7 +234,6 @@ begin
|
||||
FBuiltinSource.Name := 'Builtin';
|
||||
FBuiltinSource.Subscribe(FListener);
|
||||
FMarks := TChartMarks.Create(FChart);
|
||||
FShowInLegend := true;
|
||||
end;
|
||||
|
||||
function TChartSeries.DefaultFormattedMark(AIndex: integer): String;
|
||||
|
@ -83,7 +83,7 @@ type
|
||||
procedure Draw(ACanvas: TCanvas); virtual; abstract;
|
||||
function IsEmpty: Boolean; virtual; abstract;
|
||||
|
||||
property Active: Boolean read FActive write SetActive;
|
||||
property Active: Boolean read FActive write SetActive default true;
|
||||
property Depth: TChartDistance read FDepth write SetDepth default 0;
|
||||
property ParentChart: TChart read FChart;
|
||||
property SeriesColor: TColor
|
||||
|
@ -294,6 +294,7 @@ type
|
||||
procedure SetOnDraw(AValue: TSeriesDrawEvent);
|
||||
procedure SetOnUpdateBounds(AValue: TSeriesUpdateBoundsEvent);
|
||||
protected
|
||||
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
||||
procedure UpdateBounds(var ABounds: TDoubleRect); override;
|
||||
public
|
||||
procedure Draw(ACanvas: TCanvas); override;
|
||||
@ -550,7 +551,6 @@ constructor TLine.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
|
||||
FActive := true;
|
||||
FLineStyle := lsHorizontal;
|
||||
FPen := TPen.Create;
|
||||
FPen.OnChange := @StyleChanged;
|
||||
@ -1075,7 +1075,6 @@ constructor TFuncSeries.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FExtent := TChartExtent.Create(FChart);
|
||||
FShowInLegend := true;
|
||||
FPen := TChartPen.Create;
|
||||
FPen.OnChange := @StyleChanged;
|
||||
FStep := 2;
|
||||
@ -1191,6 +1190,11 @@ begin
|
||||
FOnDraw(ACanvas, FChart.ClipRect);
|
||||
end;
|
||||
|
||||
procedure TUserDrawnSeries.GetLegendItems(AItems: TChartLegendItems);
|
||||
begin
|
||||
Unused(AItems);
|
||||
end;
|
||||
|
||||
function TUserDrawnSeries.IsEmpty: Boolean;
|
||||
begin
|
||||
Result := not Assigned(FOnDraw);
|
||||
|
Loading…
Reference in New Issue
Block a user