Class BaseChartIndicatorPainter<TIndicator>
- Namespace
- StockSharp.Xaml.Charting.IndicatorPainters
- Assembly
- StockSharp.Xaml.Charting.dll
The indicator renderer base class on the chart (for example, lines, histograms, etc.).
public abstract class BaseChartIndicatorPainter<TIndicator> : ChartBaseViewModel, IChartIndicatorPainter, IPersistable where TIndicator : IIndicator
Type Parameters
TIndicator
Type of IIndicator.
- Inheritance
-
BaseChartIndicatorPainter<TIndicator>
- Implements
-
IPersistable
- Derived
- Inherited Members
- Extension Methods
Constructors
BaseChartIndicatorPainter()
protected BaseChartIndicatorPainter()
Properties
Element
The chart element representing the indicator.
[Browsable(false)]
public IChartIndicatorElement Element { get; }
Property Value
InnerElements
Child elements.
[Browsable(false)]
public IReadOnlyList<IChartElement> InnerElements { get; }
Property Value
IsAttached
Whether this painter is currently attached to chart element.
protected bool IsAttached { get; }
Property Value
Methods
AddChildElement(IChartElement)
Add inner chart element.
protected void AddChildElement(IChartElement element)
Parameters
element
IChartElementElement.
Draw(IChartDrawData)
To process the new data.
public virtual bool Draw(IChartDrawData data)
Parameters
data
IChartDrawDataNew data.
Returns
DrawValues(IList<IndicatorData>, IChartElement)
Draw indicator single double values.
protected bool DrawValues(IList<ChartDrawData.IndicatorData> vals, IChartElement element)
Parameters
vals
IList<ChartDrawData.IndicatorData>Values.
element
IChartElementElement.
Returns
DrawValues(IList<IndicatorData>, IChartElement, Func<IndicatorData, double>)
Draw indicator values using value getter.
protected bool DrawValues(IList<ChartDrawData.IndicatorData> vals, IChartElement element, Func<ChartDrawData.IndicatorData, double> getValue)
Parameters
vals
IList<ChartDrawData.IndicatorData>Values.
element
IChartElementElement.
getValue
Func<ChartDrawData.IndicatorData, double>Converter.
Returns
DrawValues(IList<IndicatorData>, IList<IndicatorData>, IChartElement)
Draw indicator band values (2 doubles).
protected bool DrawValues(IList<ChartDrawData.IndicatorData> vals1, IList<ChartDrawData.IndicatorData> vals2, IChartElement element)
Parameters
vals1
IList<ChartDrawData.IndicatorData>Values 1.
vals2
IList<ChartDrawData.IndicatorData>Values 2.
element
IChartElementElement.
Returns
DrawValues(IList<IndicatorData>, IList<IndicatorData>, IChartElement, Func<double, double, double>)
Draw indicator converting from 2 doubles to one with converter.
protected bool DrawValues(IList<ChartDrawData.IndicatorData> vals1, IList<ChartDrawData.IndicatorData> vals2, IChartElement element, Func<double, double, double> op)
Parameters
vals1
IList<ChartDrawData.IndicatorData>Values 1.
vals2
IList<ChartDrawData.IndicatorData>Values 2.
element
IChartElementElement.
op
Func<double, double, double>Operation.
Returns
Load(SettingsStorage)
Load settings.
public virtual void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnAttached(IChartIndicatorElement)
Called when this painter is attached to chart indicator element.
public void OnAttached(IChartIndicatorElement element)
Parameters
element
IChartIndicatorElement
OnDetached()
Called when this painter is detached from chart indicator element.
public void OnDetached()
OnDraw(TIndicator, IDictionary<IIndicator, IList<IndicatorData>>)
Draw values on chart.
protected abstract bool OnDraw(TIndicator indicator, IDictionary<IIndicator, IList<ChartDrawData.IndicatorData>> data)
Parameters
indicator
TIndicatorIndicator.
data
IDictionary<IIndicator, IList<ChartDrawData.IndicatorData>>Indicator values to draw on chart.
Returns
RemoveChildElement(IChartElement)
Remove inner chart element.
protected void RemoveChildElement(IChartElement element)
Parameters
element
IChartElementElement.
Reset()
To reset painter child elements.
public virtual void Reset()
Save(SettingsStorage)
Save settings.
public virtual void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.