EquityCurveChart
The graphical component to display the equity curve.
Inherits: UserControl
Implements: IThemeableChart, IAsyncPersistable, IComponentConnector
Constructors
public EquityCurveChart()
equityCurveChart = EquityCurveChart()
Initializes a new instance of the EquityCurveChart.
Properties
public string ChartTheme { get; set; }
value = equityCurveChart.ChartTheme
equityCurveChart.ChartTheme = value
The name of the graphic theme.
public IEnumerable<IChartBandElement> Elements { get; }
value = equityCurveChart.Elements
Elements.
public bool NoGapMode { get; set; }
value = equityCurveChart.NoGapMode
equityCurveChart.NoGapMode = value
To remove gaps (weekends, holidays) on the chart. When the mode is enabled and multiple curves are used then joint scaling will be lost. Enabled by default.
Methods
public IChartBandElement CreateCurve(string title, Color color, DrawStyles style, Guid id)
result = equityCurveChart.CreateCurve(title, color, style, id)
To create new curve to draw the yield.
- title
- The line title.
- color
- The line color.
- style
- The line drawing style. The default is Line.
- id
- Unique ID.
Returns: Chart element representing a line.
public IChartBandElement CreateCurve(string title, Color color, Color secondColor, DrawStyles style, Guid id)
result = equityCurveChart.CreateCurve(title, color, secondColor, style, id)
To create new curve to draw the yield.
- title
- The line title.
- color
- The line color.
- secondColor
- The additional line color. It is used to draw Area.
- style
- The line drawing style. The default is Line.
- id
- Unique ID.
Returns: Chart element representing a line.
public IChartDrawData CreateData()
result = equityCurveChart.CreateData()
Create IChartDrawData instance.
Returns: IChartDrawData instance.
public void Draw(IChartDrawData data)
equityCurveChart.Draw(data)
To process the new data.
- data
- New data.
public void InitializeComponent()
equityCurveChart.InitializeComponent()
InitializeComponent
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = equityCurveChart.LoadAsync(storage, cancellationToken)
Load settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
public void RemoveCurve(IChartBandElement elem)
equityCurveChart.RemoveCurve(elem)
To remove the yield curve from the chart.
- elem
- The chart element obtained from the method Guid).
public void Reset(IEnumerable<ICollection<LineData<DateTime>>> items)
equityCurveChart.Reset(items)
To reset specified chart elements.
- items
- Elements to reset.
public void Reset(IEnumerable<IChartBandElement> elements)
equityCurveChart.Reset(elements)
To reset specified chart elements.
- elements
- Elements to reset.
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = equityCurveChart.SaveAsync(storage, cancellationToken)
Save settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task