ChartElement
The base class that describes the chart element (indicator, candle, etc.).
Inherits: ChartPart<T>
Implements: IChartElementEx, IChartElement, IChartPart<IChartElement>, INotifyPropertyChanging, INotifyPropertyChanged, IPersistable
Properties
public IChartArea ChartArea { get; private set; }
value = chartElement.ChartArea
chartElement.ChartArea = value
The chart area on which the element is drawn.
public IEnumerable<IChartElement> ChildElements { get; }
value = chartElement.ChildElements
Child chart elements.
public Func<IComparable, Color?> Colorer { get; set; }
value = chartElement.Colorer
chartElement.Colorer = value
Custom elements colorer.
public string FullTitle { get; set; }
value = chartElement.FullTitle
chartElement.FullTitle = value
The full series title. If this property is undefined, auto-generated title will be used instead.
public bool IsLegend { get; set; }
value = chartElement.IsLegend
chartElement.IsLegend = value
Should this element be shown in the legend.
public bool IsVisible { get; set; }
value = chartElement.IsVisible
chartElement.IsVisible = value
Whether this element is visible on chart.
public IChartElement ParentElement { get; }
value = chartElement.ParentElement
Parent chart element.
public string XAxisId { get; set; }
value = chartElement.XAxisId
chartElement.XAxisId = value
X-axis.
public string YAxisId { get; set; }
value = chartElement.YAxisId
chartElement.YAxisId = value
Y-axis.
Methods
protected internal void AddChildElement(IChartElement element, bool dontDraw)
chartElement.AddChildElement(element, dontDraw)
Add child chart element.
- element
- dontDraw
- Do not create corresponding chart element. Used for nested elements.
public virtual bool CheckAxesCompatible(ChartAxisType? xType, ChartAxisType? yType)
result = chartElement.CheckAxesCompatible(xType, yType)
Check if the element can be drawn using supplied axis types.
- xType
- X axis type.
- yType
- Y axis type.
Returns: if supplied types are supported.
public sealed override T Clone()
result = chartElement.Clone()
Create a copy of ChartElement.
Returns: Copy.
internal override T CopyTo(T elem)
result = chartElement.CopyTo(elem)
To fill out a copy of the element.
- elem
- Copy.
Returns: Copy.
protected virtual T CreateClone()
result = chartElement.CreateClone()
Create clone but do not fill out fields/properties.
protected virtual string GetGeneratedTitle()
result = chartElement.GetGeneratedTitle()
Get generated title.
Returns: Auto generate chart element title.
public override void Load(SettingsStorage storage)
chartElement.Load(storage)
Load settings.
- storage
- Settings storage.
protected abstract bool OnDraw(ChartDrawData data)
result = chartElement.OnDraw(data)
Draw on root element.
- data
- Chart drawing data.
Returns: if the data was successfully drawn, otherwise, returns .
protected internal void RemoveChildElement(IChartElement element)
chartElement.RemoveChildElement(element)
Remove child chart element.
public override void Save(SettingsStorage storage)
chartElement.Save(storage)
Save settings.
- storage
- Settings storage.