Table of Contents

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
ChartElement<T>
Implements
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

IChartArea

ChildElements

Child chart elements.

[Browsable(false)]
public IEnumerable<IChartElement> ChildElements { get; }

Property Value

IEnumerable<IChartElement>

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

string

IsLegend

Should this element be shown in the legend.

[Browsable(false)]
public bool IsLegend { get; set; }

Property Value

bool

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

bool

ParentElement

Parent chart element.

[Browsable(false)]
public IChartElement ParentElement { get; }

Property Value

IChartElement

XAxisId

X-axis.

[Display(ResourceType = typeof(LocalizedStrings), Name = "XAxis", Description = "XAxisDesc", GroupName = "Common", Order = 1020)]
public string XAxisId { get; set; }

Property Value

string

YAxisId

Y-axis.

[Display(ResourceType = typeof(LocalizedStrings), Name = "YAxis", Description = "YAxisDesc", GroupName = "Common", Order = 1030)]
public string YAxisId { get; set; }

Property Value

string

Methods

AddChildElement(IChartElement, bool)

Add child chart element.

protected void AddChildElement(IChartElement element, bool dontDraw = false)

Parameters

element IChartElement
dontDraw bool

Do not create corresponding chart element. Used for nested elements.

Exceptions

InvalidOperationException

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

bool

true if supplied types are supported.

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 SettingsStorage

Settings storage.

OnDraw(ChartDrawData)

Draw on root element.

protected abstract bool OnDraw(ChartDrawData data)

Parameters

data ChartDrawData

Chart drawing data.

Returns

bool

true if the data was successfully drawn, otherwise, returns false.

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 SettingsStorage

Settings storage.