Lean  $LEAN_TAG$
QuantConnect.Chart Class Reference

Single Parent Chart Object for Custom Charting More...

Public Member Functions

 Chart ()
 Default constructor for chart: More...
 
 Chart (string name, ChartType type=ChartType.Overlay)
 Chart Constructor: More...
 
 Chart (string name)
 Constructor for a chart More...
 
 Chart (string name, Symbol symbol)
 Constructor for a chart More...
 
void AddSeries (BaseSeries series)
 Add a reference to this chart series: More...
 
Series TryAddAndGetSeries (string name, SeriesType type, int index, string unit, Color color, ScatterMarkerSymbol symbol, bool forceAddNew=false)
 Gets Series if already present in chart, else will add a new series and return it More...
 
BaseSeries TryAddAndGetSeries (string name, BaseSeries templateSeries, bool forceAddNew=false)
 Gets Series if already present in chart, else will add a new series and return it More...
 
Chart GetUpdates ()
 Fetch a chart with only the updates since the last request, Underlying series will save the index position. More...
 
virtual Chart Clone ()
 Return a new instance clone of this object More...
 
virtual Chart CloneEmpty ()
 Return a new empty instance clone of this object More...
 

Properties

string Name = string.Empty [get, set]
 Name of the Chart More...
 
ChartType ChartType = ChartType.Overlay [get, set]
 Type of the Chart, Overlayed or Stacked.
 
Dictionary< string, BaseSeriesSeries = new() [get, set]
 List of Series Objects for this Chart:
 
Symbol Symbol [get, set]
 Associated symbol if any, making this an asset plot More...
 
bool LegendDisabled [get, set]
 True to hide this series legend from the chart More...
 

Detailed Description

Single Parent Chart Object for Custom Charting

Definition at line 29 of file Chart.cs.

Constructor & Destructor Documentation

◆ Chart() [1/4]

QuantConnect.Chart.Chart ( )

Default constructor for chart:

Definition at line 59 of file Chart.cs.

Here is the caller graph for this function:

◆ Chart() [2/4]

QuantConnect.Chart.Chart ( string  name,
ChartType  type = ChartType.Overlay 
)

Chart Constructor:

Parameters
nameName of the Chart
typeType of the chart

Definition at line 67 of file Chart.cs.

◆ Chart() [3/4]

QuantConnect.Chart.Chart ( string  name)

Constructor for a chart

Parameters
nameString name of the chart

Definition at line 78 of file Chart.cs.

◆ Chart() [4/4]

QuantConnect.Chart.Chart ( string  name,
Symbol  symbol 
)

Constructor for a chart

Parameters
nameString name of the chart
symbolAssociated symbol if any

Definition at line 87 of file Chart.cs.

Member Function Documentation

◆ AddSeries()

void QuantConnect.Chart.AddSeries ( BaseSeries  series)

Add a reference to this chart series:

Parameters
seriesChart series class object

Definition at line 98 of file Chart.cs.

◆ TryAddAndGetSeries() [1/2]

Series QuantConnect.Chart.TryAddAndGetSeries ( string  name,
SeriesType  type,
int  index,
string  unit,
Color  color,
ScatterMarkerSymbol  symbol,
bool  forceAddNew = false 
)

Gets Series if already present in chart, else will add a new series and return it

Parameters
nameName of the series
typeType of the series
indexIndex position on the chart of the series
unitUnit for the series axis
colorColor of the series
symbolSymbol for the marker in a scatter plot series
forceAddNewTrue will always add a new Series instance, stepping on existing if any

Definition at line 121 of file Chart.cs.

◆ TryAddAndGetSeries() [2/2]

BaseSeries QuantConnect.Chart.TryAddAndGetSeries ( string  name,
BaseSeries  templateSeries,
bool  forceAddNew = false 
)

Gets Series if already present in chart, else will add a new series and return it

Parameters
nameName of the series
templateSeriesSeries to be used as a template. It will be clone without values if the series is added to the chart
forceAddNewTrue will always add a new Series instance, stepping on existing if any

Definition at line 144 of file Chart.cs.

Here is the call graph for this function:

◆ GetUpdates()

Chart QuantConnect.Chart.GetUpdates ( )

Fetch a chart with only the updates since the last request, Underlying series will save the index position.

Returns

Definition at line 160 of file Chart.cs.

Here is the call graph for this function:

◆ Clone()

virtual Chart QuantConnect.Chart.Clone ( )
virtual

Return a new instance clone of this object

Returns

Definition at line 181 of file Chart.cs.

Here is the call graph for this function:

◆ CloneEmpty()

virtual Chart QuantConnect.Chart.CloneEmpty ( )
virtual

Return a new empty instance clone of this object

Definition at line 196 of file Chart.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Property Documentation

◆ Name

string QuantConnect.Chart.Name = string.Empty
getset

Name of the Chart

Definition at line 34 of file Chart.cs.

◆ Symbol

Symbol QuantConnect.Chart.Symbol
getset

Associated symbol if any, making this an asset plot

Definition at line 48 of file Chart.cs.

◆ LegendDisabled

bool QuantConnect.Chart.LegendDisabled
getset

True to hide this series legend from the chart

Definition at line 54 of file Chart.cs.


The documentation for this class was generated from the following file: