TAChart: Move BeginUpdate/EndUpdate from TLineSeries to its ancestor, TChartSeries

git-svn-id: trunk@54235 -
This commit is contained in:
wp 2017-02-21 19:01:50 +00:00
parent 44f6051d2f
commit 0e70e5588a
2 changed files with 13 additions and 14 deletions

View File

@ -205,9 +205,11 @@ type
AXLabel: String = ''; AColor: TColor = clTAColor): Integer; overload;
function AddY(
AY: Double; ALabel: String = ''; AColor: TColor = clTAColor): Integer; inline;
procedure BeginUpdate;
procedure Clear; virtual;
function Count: Integer; inline;
procedure Delete(AIndex: Integer); virtual;
procedure EndUpdate;
function Extent: TDoubleRect; virtual;
function FormattedMark(
AIndex: Integer; AFormat: String = ''; AYIndex: Integer = 0): String;
@ -730,6 +732,11 @@ begin
Source.BeforeDraw;
end;
procedure TChartSeries.BeginUpdate;
begin
ListSource.BeginUpdate;
end;
procedure TChartSeries.Clear;
begin
ListSource.Clear;
@ -773,6 +780,12 @@ begin
inherited;
end;
procedure TChartSeries.EndUpdate;
begin
ListSource.EndUpdate;
UpdateParentChart;
end;
function TChartSeries.Extent: TDoubleRect;
begin
Result := Source.ExtentCumulative;

View File

@ -209,9 +209,6 @@ type
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Draw(ADrawer: IChartDrawer); override;
public
procedure BeginUpdate;
procedure EndUpdate;
published
property AxisIndexX;
property AxisIndexY;
@ -378,11 +375,6 @@ begin
inherited Assign(ASource);
end;
procedure TLineSeries.BeginUpdate;
begin
ListSource.BeginUpdate;
end;
constructor TLineSeries.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
@ -568,12 +560,6 @@ begin
DrawPointers(ADrawer);
end;
procedure TLineSeries.EndUpdate;
begin
ListSource.EndUpdate;
UpdateParentChart;
end;
procedure TLineSeries.GetLegendItems(AItems: TChartLegendItems);
var
lp: TPen;