Chart panels
This commit is contained in:
@@ -9,6 +9,7 @@ uses
|
||||
FMX.Graphics,
|
||||
Myc.Signals,
|
||||
Myc.Lazy,
|
||||
Myc.Trade.Types,
|
||||
Myc.Trade.DataArray,
|
||||
Myc.Trade.DataPoint,
|
||||
Myc.Fmx.Chart;
|
||||
@@ -66,7 +67,7 @@ type
|
||||
procedure Update; override;
|
||||
procedure Paint(const Canvas: TCanvas; First, Last: Int64; const XForm, YForm: TFunc<Double, Single>); override;
|
||||
public
|
||||
constructor Create(AOwner: TMycChart; const ADataProvider: IMycDataProvider<T>);
|
||||
constructor Create(AParent: TMycChart.TPanel; const ADataProvider: IMycDataProvider<T>);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
@@ -80,7 +81,7 @@ type
|
||||
procedure Paint(const Canvas: TCanvas; First, Last: Int64; const XForm, YForm: TFunc<Double, Single>); override;
|
||||
public
|
||||
constructor Create(
|
||||
AOwner: TMycChart;
|
||||
AParent: TMycChart.TPanel;
|
||||
const ADataProvider: IMycDataProvider<TOhlcItem>;
|
||||
const AUpColor, ADownColor: TMutable<TAlphaColor>
|
||||
);
|
||||
@@ -96,7 +97,7 @@ type
|
||||
procedure Paint(const Canvas: TCanvas; First, Last: Int64; const XForm, YForm: TFunc<Double, Single>); override;
|
||||
public
|
||||
constructor Create(
|
||||
AOwner: TMycChart;
|
||||
AParent: TMycChart.TPanel;
|
||||
const ADataProvider: IMycDataProvider<Double>;
|
||||
const ALineColor: TAlphaColor;
|
||||
ALineWidth: Single
|
||||
@@ -176,13 +177,13 @@ end;
|
||||
{ TChartLineLayer }
|
||||
|
||||
constructor TChartLineLayer.Create(
|
||||
AOwner: TMycChart;
|
||||
AParent: TMycChart.TPanel;
|
||||
const ADataProvider: IMycDataProvider<Double>;
|
||||
const ALineColor: TAlphaColor;
|
||||
ALineWidth: Single
|
||||
);
|
||||
begin
|
||||
inherited Create(AOwner, ADataProvider);
|
||||
inherited Create(AParent, ADataProvider);
|
||||
FLineColor := ALineColor;
|
||||
FLineWidth := ALineWidth;
|
||||
end;
|
||||
@@ -235,12 +236,12 @@ end;
|
||||
{ TChartOhlcLayer }
|
||||
|
||||
constructor TChartOhlcLayer.Create(
|
||||
AOwner: TMycChart;
|
||||
AParent: TMycChart.TPanel;
|
||||
const ADataProvider: IMycDataProvider<TOhlcItem>;
|
||||
const AUpColor, ADownColor: TMutable<TAlphaColor>
|
||||
);
|
||||
begin
|
||||
inherited Create(AOwner, ADataProvider);
|
||||
inherited Create(AParent, ADataProvider);
|
||||
FUpColor := AUpColor;
|
||||
FDownColor := ADownColor;
|
||||
|
||||
@@ -302,10 +303,10 @@ end;
|
||||
|
||||
{ TChartCustomLayer }
|
||||
|
||||
constructor TChartCustomLayer<T>.Create(AOwner: TMycChart; const ADataProvider: IMycDataProvider<T>);
|
||||
constructor TChartCustomLayer<T>.Create(AParent: TMycChart.TPanel; const ADataProvider: IMycDataProvider<T>);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FSeries := TChartSeriesProcessor<T>.Create(ADataProvider, AOwner.Lookback.AsMutable);
|
||||
inherited Create(AParent);
|
||||
FSeries := TChartSeriesProcessor<T>.Create(ADataProvider, AParent.Owner.Lookback.AsMutable);
|
||||
end;
|
||||
|
||||
destructor TChartCustomLayer<T>.Destroy;
|
||||
|
||||
Reference in New Issue
Block a user