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...
 

Public Attributes

string Name = ""
 Name of the Chart:
 
ChartType ChartType = ChartType.Overlay
 Type of the Chart, Overlayed or Stacked.
 
Dictionary< string, BaseSeriesSeries = new Dictionary<string, BaseSeries>()
 List of Series Objects for this Chart:
 

Properties

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 57 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 65 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 76 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 85 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 96 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 119 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 142 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 158 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 179 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 194 of file Chart.cs.

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

Property Documentation

◆ Symbol

Symbol QuantConnect.Chart.Symbol
getset

Associated symbol if any, making this an asset plot

Definition at line 46 of file Chart.cs.

◆ LegendDisabled

bool QuantConnect.Chart.LegendDisabled
getset

True to hide this series legend from the chart

Definition at line 52 of file Chart.cs.


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