Class ChartElement<T>
- Namespace
- StockSharp.Xaml.Charting
- Assembly
- StockSharp.Xaml.Charting.dll
The base class that describes the chart element (indicator, candle, etc.).
[TypeConverter(typeof(ExpandableObjectConverter))]
public abstract class ChartElement<T> : ChartPart<T>, IChartPart<T>, IChartElement, IChartPart<IChartElement>, INotifyPropertyChanging, INotifyPropertyChanged, IPersistable where T : ChartElement<T>
Type Parameters
T
The chart element type.
- Inheritance
-
ChartPart<T>ChartElement<T>
- Implements
-
IChartPart<T>IPersistable
- Derived
- Inherited Members
- Extension Methods
Constructors
ChartElement()
protected ChartElement()
Properties
ChartArea
The chart area on which the element is drawn.
[Browsable(false)]
public IChartArea ChartArea { get; }
Property Value
ChildElements
Child chart elements.
[Browsable(false)]
public IEnumerable<IChartElement> ChildElements { get; }
Property Value
Colorer
Custom elements colorer.
[Browsable(false)]
public Func<IComparable, Color?> Colorer { get; set; }
Property Value
- Func<IComparable, Color?>
FullTitle
The full series title. If this property is undefined, auto-generated title will be used instead.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Name", Description = "NameDot", GroupName = "Common", Order = 1000)]
public string FullTitle { get; set; }
Property Value
IsLegend
Should this element be shown in the legend.
[Browsable(false)]
public bool IsLegend { get; set; }
Property Value
IsVisible
Whether this element is visible on chart.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Show", Description = "ShowDot", GroupName = "Common", Order = 1010)]
public bool IsVisible { get; set; }
Property Value
ParentElement
Parent chart element.
[Browsable(false)]
public IChartElement ParentElement { get; }
Property Value
XAxisId
X-axis.
[Display(ResourceType = typeof(LocalizedStrings), Name = "XAxis", Description = "XAxisDesc", GroupName = "Common", Order = 1020)]
public string XAxisId { get; set; }
Property Value
YAxisId
Y-axis.
[Display(ResourceType = typeof(LocalizedStrings), Name = "YAxis", Description = "YAxisDesc", GroupName = "Common", Order = 1030)]
public string YAxisId { get; set; }
Property Value
Methods
AddChildElement(IChartElement, bool)
Add child chart element.
protected void AddChildElement(IChartElement element, bool dontDraw = false)
Parameters
element
IChartElementdontDraw
boolDo not create corresponding chart element. Used for nested elements.
Exceptions
CheckAxesCompatible(ChartAxisType?, ChartAxisType?)
Check if the element can be drawn using supplied axis types.
public virtual bool CheckAxesCompatible(ChartAxisType? xType, ChartAxisType? yType)
Parameters
xType
ChartAxisType?X axis type.
yType
ChartAxisType?Y axis type.
Returns
Clone()
Create a copy of ChartElement<T>.
public override sealed T Clone()
Returns
- T
Copy.
CreateClone()
Create clone but do not fill out fields/properties.
protected virtual T CreateClone()
Returns
- T
GetGeneratedTitle()
Get generated title.
protected virtual string GetGeneratedTitle()
Returns
- string
Auto generate chart element title.
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnDraw(ChartDrawData)
Draw on root element.
protected abstract bool OnDraw(ChartDrawData data)
Parameters
data
ChartDrawDataChart drawing data.
Returns
OnReset()
Reset element.
protected virtual void OnReset()
RemoveChildElement(IChartElement)
Remove child chart element.
protected void RemoveChildElement(IChartElement element)
Parameters
element
IChartElement
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.