Class Chart
A general purpose class for plotting time series charts.
public class Chart : ChartBase, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, ISupportInitialize, IDisposable
- Inheritance
-
Chart
- Implements
- Inherited Members
- Extension Methods
Constructors
Chart()
Instantiates a new class.
public Chart()
Chart(IContainer)
Instantiates a new class.
public Chart(IContainer container)
Parameters
container
IContainer
Properties
Dates
Gets the dates along the x-axis.
protected List<DateTime> Dates { get; }
Property Value
ShowLegends
Gets/sets whether the chart area legends are shown.
public bool ShowLegends { get; set; }
Property Value
Methods
AddEventMarkers(IEnumerable<EventMarker>, bool)
Adds event markers to the primary series plot.
public void AddEventMarkers(IEnumerable<EventMarker> markers, bool async = false)
Parameters
markers
IEnumerable<EventMarker>async
bool
Exceptions
AddPlot(PlotInstruction)
Adds a plot instruction after the main chart has been created. Typically used for adding vertical or horizontal lines after the fact in a custom scenario.
public void AddPlot(PlotInstruction plot)
Parameters
plot
PlotInstruction
Exceptions
AddSignalArrows(Strategy, bool, int)
Adds signal arrows for trades that match the primary series.
public void AddSignalArrows(Strategy strategy, bool async = false, int chartArea = 0)
Parameters
AddSignalArrows(IEnumerable<Trade>, bool, int)
Adds entry/exit annotations to the chart.
public void AddSignalArrows(IEnumerable<Trade> fills, bool async = false, int chartArea = 0)
Parameters
fills
IEnumerable<Trade>async
boolchartArea
int
Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)
Parameters
disposing
booltrue if managed resources should be disposed; otherwise, false.
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
OnMouseMove(MouseEventArgs)
Updates cursor for data window output.
protected override void OnMouseMove(MouseEventArgs e)
Parameters
OnPreviewKeyDown(PreviewKeyDownEventArgs)
Traps key presses for navigation.
protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
Parameters
Plot(DateAlignment, MissingValues, params PlotInstruction[])
Plots the specified instructions using the specified date alignment and missing values handling.
public void Plot(Chart.DateAlignment align, Chart.MissingValues missing, params PlotInstruction[] plots)
Parameters
align
Chart.DateAlignmentmissing
Chart.MissingValuesplots
PlotInstruction[]
Plot(DateAlignment, params PlotInstruction[])
Plots the specified instructions using the specified DateAlignment parameter.
public void Plot(Chart.DateAlignment align, params PlotInstruction[] plots)
Parameters
align
Chart.DateAlignmentplots
PlotInstruction[]
Plot(params PlotInstruction[])
Plots the specified instructions using DateAlignment.Union to sync dates.
public void Plot(params PlotInstruction[] plots)
Parameters
plots
PlotInstruction[]
Plot(IEnumerable<MarketProfile>)
Overlays the specified enumerable of market profiles using forward alignment.
public void Plot(IEnumerable<MarketProfile> profiles)
Parameters
profiles
IEnumerable<MarketProfile>
Plot(IEnumerable<MarketProfile>, MarketProfileAlignment)
Overlays the specifed market profiles using the specified alignment.
public void Plot(IEnumerable<MarketProfile> profiles, Chart.MarketProfileAlignment alignment)
Parameters
profiles
IEnumerable<MarketProfile>alignment
Chart.MarketProfileAlignment
Plot(IEnumerable<PlotInstruction>)
Plots the specified instructions.
public void Plot(IEnumerable<PlotInstruction> plots)
Parameters
plots
IEnumerable<PlotInstruction>
Exceptions
SetYAxisScaling(int, int)
Sets the y-axis scaling. Overrides base class to scale market profiles if any.
protected override void SetYAxisScaling(int start, int stop)