Table of Contents

Class ChartViewModel

Namespace
Balsam.Charting
Assembly
Balsam.Charting.dll

Controls chart presentation.

public class ChartViewModel : BaseViewModel, INotifyPropertyChanged
Inheritance
ChartViewModel
Implements
Inherited Members
Extension Methods

Constructors

ChartViewModel()

Initializes a new ChartViewModel.

public ChartViewModel()

Properties

ChartPaneViewModels

Gets/sets the collection of chart pane view models.

public ObservableCollection<PaneViewModel> ChartPaneViewModels { get; set; }

Property Value

ObservableCollection<PaneViewModel>

HalfPageLeft

Gets the command to move a half page to the left.

public ICommand HalfPageLeft { get; }

Property Value

ICommand

HalfPageRight

Gets the command to move a half page to the right.

public ICommand HalfPageRight { get; }

Property Value

ICommand

PageLeft

Gets the page left command which moves chart one full frame to the left.

public ICommand PageLeft { get; }

Property Value

ICommand

PageRight

Gets the page right command which moves chart one full frame to the right.

public ICommand PageRight { get; }

Property Value

ICommand

ScrollLeft

Gets the scroll left command which scrolls left by a single bar.

public ICommand ScrollLeft { get; }

Property Value

ICommand

ScrollRight

Gets the scroll right command which scrolls right by a single bar.

public ICommand ScrollRight { get; }

Property Value

ICommand

ScrollToEnd

Gets the scroll to end command which scrolls to the end of the chart.

public ICommand ScrollToEnd { get; }

Property Value

ICommand

ScrollToStart

Gets the scroll to start command which scrolls to the beginning of the chart.

public ICommand ScrollToStart { get; }

Property Value

ICommand

SetTheme

Gets the set theme command.

public ICommand SetTheme { get; }

Property Value

ICommand

ShowCrosshairs

Gets/sets whether the crosshairs are visible.

public bool ShowCrosshairs { get; set; }

Property Value

bool

ShowLegends

Gets/sets whether the chart legends are visible.

public bool ShowLegends { get; set; }

Property Value

bool

Theme

Gets/sets the theme used.

public string Theme { get; set; }

Property Value

string

UndoZoom

Gets the undo zoom command.

public ICommand UndoZoom { get; }

Property Value

ICommand

UseLogScale

Gets/sets whether the primary pane has a log axis.

public bool UseLogScale { get; set; }

Property Value

bool

VerticalChartGroupId

Gets/sets the vertical chart group id which maintains layout synchronization.

public string VerticalChartGroupId { get; set; }

Property Value

string

XVisibleRange

Gets/sets the shared XAxis visible range for all charts

public IndexRange XVisibleRange { get; set; }

Property Value

IndexRange

ZoomExtents

Gets the zoom extents command which zooms all the way out.

public ICommand ZoomExtents { get; }

Property Value

ICommand

Methods

AddSignalArrows(Strategy)

Adds signal arrows to the primary price plot.

public void AddSignalArrows(Strategy strategy)

Parameters

strategy Strategy

GetPlotInstructions(params ISeries[])

Returns an array of plot instructions from the specified series. Useful for plotting many series in the same pane (i.e. a broom chart).

public PlotInstruction[] GetPlotInstructions(params ISeries[] series)

Parameters

series ISeries[]

Returns

PlotInstruction[]

Plot(params PlotInstruction[])

Plots the specified plot instructions.

public void Plot(params PlotInstruction[] plots)

Parameters

plots PlotInstruction[]

Plot(Strategy)

Plots the specified strategy.

public void Plot(Strategy strategy)

Parameters

strategy Strategy

SetVisibleRange(DateTime, DateTime)

Sets the visible range the specified start and end dates.

public void SetVisibleRange(DateTime startDate, DateTime endDate)

Parameters

startDate DateTime
endDate DateTime

ZoomToLastNBars(int, int)

Zooms to the char the specified number of bars, hiding the scroll bar.

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

Parameters

bars int
extraBars int