EJSC.Chart.addSeries

See Also

Top  Previous  Next

 

Definition

 

EJSC.Series addSeries( EJSC.Series series, boolean redraw )

 

Description

 

Adds a new series to the chart and returns the newly added series (this is useful when creating series inline as shown in the example below).  The series must descend from EJSC.Series.

 

If redraw is false, drawing will not occur immediately but will not be entirely prevented.  Certain actions such as adding an additional series with redraw = true, or chart dimensions changing may still trigger the series to draw.  The default, if redraw is omitted is true.

 

Note: If the series has not defined a title (i.e. Series.title = "") at the time addSeries is called, a default title of "Series <index>" will be assigned (where <index> is the current series index in internal series storage).

 

Types:

EJSC.AlarmSeries

EJSC.AnalogGaugeSeries

EJSC.AreaSeries

EJSC.BarSeries

EJSC.CandlestickSeries

EJSC.DoughnutSeries

EJSC.ErrorSeries

EJSC.FloatingBarSeries

EJSC.FunctionSeries

EJSC.LineSeries

EJSC.OpenHighLowCloseSeries

EJSC.OverUnderSeries

EJSC.PieSeries

EJSC.ScatterSeries

EJSC.StepSeries

EJSC.StackedBarSeries

EJSC.TrendSeries

 

Example

 

>> Add a line series to the chart.

 

var myChart = new EJSC.Chart("chart");

var mySeries = myChart.addSeries(new EJSC.LineSeries(...));