mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 13:49:32 +02:00
TAChart: Update chart after change of axis interval parameters
git-svn-id: trunk@31859 -
This commit is contained in:
parent
e486d01537
commit
7195e84854
@ -556,6 +556,8 @@ begin
|
||||
FValueMax := Math.Min(Max, FValueMax);
|
||||
end;
|
||||
d := MakeValuesInRangeParams(FValueMin, FValueMax);
|
||||
FValueMin := GetTransform.AxisToGraph(FValueMin);
|
||||
FValueMax := GetTransform.AxisToGraph(FValueMax);
|
||||
end;
|
||||
SetLength(FMarkValues, 0);
|
||||
vis := TChartAxisList(Collection).OnVisitSources;
|
||||
|
@ -87,6 +87,7 @@ type
|
||||
TCustomChartAxisMarks = class(TBasicChartAxisMarks)
|
||||
strict private
|
||||
FDefaultSource: TIntervalChartSource;
|
||||
FDefaultListener: TListener;
|
||||
FStripes: TChartStyles;
|
||||
procedure SetStripes(AValue: TChartStyles);
|
||||
strict protected
|
||||
@ -524,13 +525,16 @@ end;
|
||||
constructor TCustomChartAxisMarks.Create(AOwner: TCustomChart);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FDefaultListener := TListener.Create(nil, @StyleChanged);
|
||||
FDefaultSource := TIntervalChartSource.Create(AOwner);
|
||||
FDefaultSource.Broadcaster.Subscribe(FDefaultListener);
|
||||
FDistance := 1;
|
||||
FLabelBrush.Style := bsClear;
|
||||
end;
|
||||
|
||||
destructor TCustomChartAxisMarks.Destroy;
|
||||
begin
|
||||
FreeAndNil(FDefaultListener);
|
||||
FreeAndNil(FDefaultSource);
|
||||
inherited;
|
||||
end;
|
||||
|
@ -637,7 +637,8 @@ end;
|
||||
procedure TListener.Forget;
|
||||
begin
|
||||
FBroadcaster := nil;
|
||||
FRef^ := nil;
|
||||
if FRef <> nil then
|
||||
FRef^ := nil;
|
||||
end;
|
||||
|
||||
function TListener.GetIsListening: Boolean;
|
||||
|
@ -196,7 +196,10 @@ end;
|
||||
|
||||
procedure TChartAxisIntervalParams.Changed;
|
||||
begin
|
||||
// Empty.
|
||||
with FOwner as TCustomChartSource do begin
|
||||
BeginUpdate;
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TChartAxisIntervalParams.Create(AOwner: TPersistent);
|
||||
|
Loading…
Reference in New Issue
Block a user