EJSC.StackedBarSeries.addSeries

See Also

Top  Previous  Next

 

Definition

 

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

 

Description

 

Adds a new series to the stacked bar series and returns the newly added series (this is useful when creating series inline as shown in the example below).  The series must be a EJSC.BarSeries and have the same orientation as the stacked bar series being added to..

 

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

 

 

Example

 

>> Add new bar series to an existing stacked bar series.

 

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

var myStackedSeries = myChart.addSeries(new EJSC.StackedBarSeries(data, { }));

 

 

var myBarSeries1 = myStackedSeries.addSeries(new EJSC.BarSeries(...));

var myBarSeries2 = myStackedSeries.addSeries(new EJSC.BarSeries(...));

var myBarSeries3 = myStackedSeries.addSeries(new EJSC.BarSeries(...));

var myBarSeries4 = myStackedSeries.addSeries(new EJSC.BarSeries(...));

var myBarSeries5 = myStackedSeries.addSeries(new EJSC.BarSeries(...));