SpreadJS 13
GC.Spread.Sheets.Charts Namespace / SeriesCollection type / add Method
The series of the chart.
, seriesItem The symbol of the series.
The symbol fill color of the series.
The symbol size of the series.
The symbol shape of the series.
The symbol border of the series.
The symbol border color of the series.
The symbol border width of the series.
The symbol border line Type of the series.
The chart type of the series.
The axis group of the series.
The background color of the series.
The transparency of the series background color.
The border of the series.
The border color of the series.
The transparency of the series border color.
The border width of the series.
The border line type of the series.
The first slice angle of the chart whose chart type is pie. The default value is 0, which represents the 12 o'clock position.
The name formula of the series.
The x values formula of the series.
The y values formula of the series.
The bubble sizes formula of the series. This is used for bubble chart.
In This Topic
    add Method
    In This Topic
    Adds a new series to series collection.
    Syntax
    var instance = new GC.Spread.Sheets.Charts.SeriesCollection();
    var value; // Type: any
    value = instance.add(seriesItem,
                         seriesItem.symbol,
                         seriesItem.symbol.fill,
                         seriesItem.symbol.size,
                         seriesItem.symbol.shape,
                         seriesItem.symbol.border,
                         seriesItem.symbol.border.color,
                         seriesItem.symbol.border.width,
                         seriesItem.symbol.border.lineType,
                         seriesItem.chartType,
                         seriesItem.axisGroup,
                         seriesItem.backColor,
                         seriesItem.backColorTransparency,
                         seriesItem.border,
                         seriesItem.border.color,
                         seriesItem.border.transparency,
                         seriesItem.border.width,
                         seriesItem.border.lineType,
                         seriesItem.startAngle,
                         seriesItem.name,
                         seriesItem.xValues,
                         seriesItem.yValues,
                         seriesItem.bubbleSizes);
    function add( 
       seriesItem : Object,
       seriesItem.symbol : Object,
       seriesItem.symbol.fill : string,
       seriesItem.symbol.size : number,
       seriesItem.symbol.shape : SymbolShape,
       seriesItem.symbol.border : Object,
       seriesItem.symbol.border.color : string,
       seriesItem.symbol.border.width : number,
       seriesItem.symbol.border.lineType : LineType,
       seriesItem.chartType : ChartType,
       seriesItem.axisGroup : AxisGroup,
       seriesItem.backColor : string,
       seriesItem.backColorTransparency : number,
       seriesItem.border : string,
       seriesItem.border.color : string,
       seriesItem.border.transparency : number,
       seriesItem.border.width : number,
       seriesItem.border.lineType : GC.Spread.Sheets.Charts.LineDashStyle,
       seriesItem.startAngle : number,
       seriesItem.name : string,
       seriesItem.xValues : string,
       seriesItem.yValues : string,
       seriesItem.bubbleSizes : string
    ) : any;

    Parameters

    seriesItem
    The series of the chart.
    seriesItem.symbol
    , seriesItem The symbol of the series.
    seriesItem.symbol.fill
    The symbol fill color of the series.
    seriesItem.symbol.size
    The symbol size of the series.
    seriesItem.symbol.shape
    The symbol shape of the series.
    seriesItem.symbol.border
    The symbol border of the series.
    seriesItem.symbol.border.color
    The symbol border color of the series.
    seriesItem.symbol.border.width
    The symbol border width of the series.
    seriesItem.symbol.border.lineType
    The symbol border line Type of the series.
    seriesItem.chartType
    The chart type of the series.
    seriesItem.axisGroup
    The axis group of the series.
    seriesItem.backColor
    The background color of the series.
    seriesItem.backColorTransparency
    The transparency of the series background color.
    seriesItem.border
    The border of the series.
    seriesItem.border.color
    The border color of the series.
    seriesItem.border.transparency
    The transparency of the series border color.
    seriesItem.border.width
    The border width of the series.
    seriesItem.border.lineType
    The border line type of the series.
    seriesItem.startAngle
    The first slice angle of the chart whose chart type is pie. The default value is 0, which represents the 12 o'clock position.
    seriesItem.name
    The name formula of the series.
    seriesItem.xValues
    The x values formula of the series.
    seriesItem.yValues
    The y values formula of the series.
    seriesItem.bubbleSizes
    The bubble sizes formula of the series. This is used for bubble chart.
    Example
    // This example shows how to add a new series.
    var dataRange = "A1:D4";
    var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
    chart.series.add({
        chartType: GC.Spread.Sheets.Charts.ChartType.columnClustered,
        axisGroup: GC.Spread.Sheets.Charts.AxisGroup.primary,
        backColor: {
            color: "lightblue",
            width: 2
        },
        xValues: "A2:A4",
        yValues: "B2:B4"
    });
    See Also