TAChart: Add TChartExtentLink.Enabled property

git-svn-id: trunk@32128 -
This commit is contained in:
ask 2011-08-31 03:06:29 +00:00
parent 51fbee76a6
commit eb98fba4db

View File

@ -34,6 +34,7 @@ type
TChartExtentLink = class(TComponent)
strict private
FEnabled: Boolean;
FLinkedCharts: TLinkedCharts;
FMode: TChartExtendLinkMode;
public
@ -42,6 +43,7 @@ type
procedure SyncWith(AChart: TChart);
published
property Enabled: Boolean read FEnabled write FEnabled default true;
property LinkedCharts: TLinkedCharts read FLinkedCharts write FLinkedCharts;
property Mode: TChartExtendLinkMode read FMode write FMode default elmXY;
end;
@ -106,6 +108,7 @@ end;
constructor TChartExtentLink.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FEnabled := true;
FLinkedCharts := TLinkedCharts.Create(Self);
end;
@ -126,7 +129,7 @@ procedure TChartExtentLink.SyncWith(AChart: TChart);
var
c: TCollectionItem;
begin
if AChart = nil then exit;
if not FEnabled or (AChart = nil) then exit;
for c in LinkedCharts do
with TLinkedChart(c).Chart do begin
// Do not sync if the chart was never drawn yet.