mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 21:36:27 +02:00
TAChart: Allow assignment of TFuncSeries, TColorMapSeries, TIntervalList
git-svn-id: trunk@29320 -
This commit is contained in:
parent
e6d3ed279e
commit
636d7a10cb
@ -94,6 +94,7 @@ type
|
|||||||
procedure SetEpsilon(AValue: Double);
|
procedure SetEpsilon(AValue: Double);
|
||||||
procedure SetOnChange(AValue: TNotifyEvent);
|
procedure SetOnChange(AValue: TNotifyEvent);
|
||||||
public
|
public
|
||||||
|
procedure Assign(ASource: TIntervalList);
|
||||||
constructor Create;
|
constructor Create;
|
||||||
public
|
public
|
||||||
procedure AddPoint(APoint: Double); inline;
|
procedure AddPoint(APoint: Double); inline;
|
||||||
@ -965,6 +966,12 @@ begin
|
|||||||
Changed;
|
Changed;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIntervalList.Assign(ASource: TIntervalList);
|
||||||
|
begin
|
||||||
|
FEpsilon := ASource.FEpsilon;
|
||||||
|
FIntervals := Copy(ASource.FIntervals);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIntervalList.Changed;
|
procedure TIntervalList.Changed;
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnChange) then
|
if Assigned(FOnChange) then
|
||||||
|
@ -44,6 +44,7 @@ type
|
|||||||
procedure AfterAdd; override;
|
procedure AfterAdd; override;
|
||||||
procedure GetBounds(var ABounds: TDoubleRect); override;
|
procedure GetBounds(var ABounds: TDoubleRect); override;
|
||||||
public
|
public
|
||||||
|
procedure Assign(ASource: TPersistent); override;
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
published
|
published
|
||||||
@ -72,6 +73,7 @@ type
|
|||||||
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
procedure Assign(ASource: TPersistent); override;
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
@ -111,6 +113,7 @@ type
|
|||||||
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
procedure Assign(ASource: TPersistent); override;
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
@ -152,6 +155,14 @@ begin
|
|||||||
FExtent.SetOwner(FChart);
|
FExtent.SetOwner(FChart);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TBasicFuncSeries.Assign(ASource: TPersistent);
|
||||||
|
begin
|
||||||
|
if ASource is TBasicFuncSeries then
|
||||||
|
with TBasicFuncSeries(ASource) do
|
||||||
|
Self.Extent := FExtent;
|
||||||
|
inherited Assign(ASource);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TBasicFuncSeries.Create(AOwner: TComponent);
|
constructor TBasicFuncSeries.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
@ -183,6 +194,18 @@ end;
|
|||||||
|
|
||||||
{ TFuncSeries }
|
{ TFuncSeries }
|
||||||
|
|
||||||
|
procedure TFuncSeries.Assign(ASource: TPersistent);
|
||||||
|
begin
|
||||||
|
if ASource is TFuncSeries then
|
||||||
|
with TFuncSeries(ASource) do begin
|
||||||
|
Self.FDomainExclusions.Assign(FDomainExclusions);
|
||||||
|
Self.FOnCalculate := FOnCalculate;
|
||||||
|
Self.Pen := FPen;
|
||||||
|
Self.FStep := FStep;
|
||||||
|
end;
|
||||||
|
inherited Assign(ASource);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TFuncSeries.Create(AOwner: TComponent);
|
constructor TFuncSeries.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
@ -340,6 +363,20 @@ end;
|
|||||||
|
|
||||||
{ TColorMapSeries }
|
{ TColorMapSeries }
|
||||||
|
|
||||||
|
procedure TColorMapSeries.Assign(ASource: TPersistent);
|
||||||
|
begin
|
||||||
|
if ASource is TColorMapSeries then
|
||||||
|
with TColorMapSeries(ASource) do begin
|
||||||
|
Self.Brush := FBrush;
|
||||||
|
Self.ColorSource := FColorSource;
|
||||||
|
Self.FInterpolate := FInterpolate;
|
||||||
|
Self.FOnCalculate := FOnCalculate;
|
||||||
|
Self.FStepX := FStepX;
|
||||||
|
Self.FStepY := FStepY;
|
||||||
|
end;
|
||||||
|
inherited Assign(ASource);
|
||||||
|
end;
|
||||||
|
|
||||||
function TColorMapSeries.ColorByValue(AValue: Double): TColor;
|
function TColorMapSeries.ColorByValue(AValue: Double): TColor;
|
||||||
var
|
var
|
||||||
lb, ub: Integer;
|
lb, ub: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user