Table of Contents

Class ChartBase

Namespace
Balsam.Charting
Assembly
Balsam.Charting.dll

Implements some common functionality across all backtester charts.

public class ChartBase : Chart, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, ISupportInitialize, IDisposable
Inheritance
ChartBase
Implements
Derived
Inherited Members
Extension Methods

Properties

Title

Gets/sets a title to display on the chart form.

public string Title { get; set; }

Property Value

string

Methods

AddPadding(int)

Adds spacing to the right side of the chart.

public void AddPadding(int bars)

Parameters

bars int

Exceptions

ArgumentOutOfRangeException

CopyToClipboard()

Copies an image of the chart to the clipboard.

protected void CopyToClipboard()

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed; otherwise, false.

SaveImage(string)

Saves the image using the specifed file name. Chart image format is inferred from the image filename extension.

public void SaveImage(string imageFileName)

Parameters

imageFileName string

Exceptions

ArgumentNullException

SetYAxisScaling(int, int)

Sets the y-axis scaling to the min and max found between the specified start and stop indexes.

protected virtual void SetYAxisScaling(int start, int stop)

Parameters

start int
stop int

ZoomToLastNBars(int, int)

Zoom to the specified number of bars on the right-hand side of the chart.

public void ZoomToLastNBars(int bars, int extraBars = 1)

Parameters

bars int
extraBars int

Used to add extra space on right-hand side.