SpreadJS 13
GC.Spread.Sheets.Charts Namespace / SeriesCollection type / set Method
The index of the series.
The series of the chart.
, seriesItem The symbol of the series.
The symbol fill color of the series.
The transparency of the symbol fill color.
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 transparency of the symbol border color.
The symbol border width of the series.
The symbol border line Type of the series.
The error bars of the series.
The vertical error bar of the series, each series may has different direction error bar(s) based on chart type.
The error bar type.
The error bar value type.
The error bar has end cap or not.
The error bar value, just take effect on the FixedValue(1) / Percentage(2) / StandardDeviation(3) value type.
The error bar custom formulas, it contains positive formula and negative formula, just take effect on the Custom(0) value type.
The error bar custom positive formula.
The error bar custom negative formula.
The error bar styles.
The error bar color.
The error bar transparency.
The error bar width.
The horizontal error bar of the series, each series may has different direction error bar(s) based on chart type.
The error bar type.
The error bar value type.
The error bar has end cap or not.
The error bar value, just take effect on the FixedValue(1) / Percentage(2) / StandardDeviation(3) value type.
The error bar custom formulas, it contains positive formula and negative formula, just take effect on the Custom(0) value type.
The error bar custom positive formula.
The error bar custom negative formula.
The error bar styles.
The error bar color.
The error bar transparency.
The error bar width.
The error bar dash style.
The trendlines of the series.[0].type The type of the trendline.[0].order The order of the polynomial trendline.[0].period The period of the movingAverage trendline.[0].intercept The intercept of the trendline.[0].forward The forward of the trendline.[0].backward The backward of the trendline.[0].displayEquation Whether display the equation of the trendline.[0].displayRSquared Whether display the R squared of the trendline.[0].fontFamily The fontFamily of the trendline.[0].fontSize The fontSize of the trendline.[0].fontColor The fontColor of the trendline.[0].name The name of the trendline.[0].style The line style of the trendline.[0].style.color The color of the trendline.[0].style.transparency The transparency of the trendline.[0].style.width The width of the trendline.[0].style.dashStyle The dash style of the trendline.The trendlines 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 border line type of the series.
The transparency of the series border color.
The border width 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.The bubble sizes formula of the series. This is used for bubble chart.
The data labels of the series.
Whether to show value in series data labels.
Whether to show series name in series data labels.
Whether to show category name in series data labels.
Whether to show the percent value in series data labels.
the separator of the series data labels.
The position of the series data labels.
The format of the series data labels.
The text color of the series data labels.
The text color transparency of the series data labels.
The background color of the series data labels.
The background color transparency of the series data labels.
The border color of the series data labels.
The border width of the series data labels.
The border color transparency of the series data labels.
In This Topic
    set Method
    In This Topic
    Updates the specified series's property.
    Syntax
    var instance = new GC.Spread.Sheets.Charts.SeriesCollection();
    var value; // Type: any
    value = instance.set(index,
                         seriesItem,
                         seriesItem.symbol,
                         seriesItem.symbol.fill,
                         seriesItem.symbol.fillColorTransparency,
                         seriesItem.symbol.size,
                         seriesItem.symbol.shape,
                         seriesItem.symbol.border,
                         seriesItem.symbol.border.color,
                         seriesItem.symbol.border.colorTransparency,
                         seriesItem.symbol.border.width,
                         seriesItem.symbol.border.lineType,
                         seriesItem.errorbars,
                         seriesItem.errorbars.vertical,
                         seriesItem.errorbars.vertical.type,
                         seriesItem.errorbars.vertical.valuetype,
                         seriesItem.errorbars.vertical.noEndCap,
                         seriesItem.errorbars.vertical.value,
                         seriesItem.errorbars.vertical.custom,
                         seriesItem.errorbars.vertical.custom.positive,
                         seriesItem.errorbars.vertical.custom.negative,
                         seriesItem.errorbars.vertical.style,
                         seriesItem.errorbars.vertical.style.color,
                         seriesItem.errorbars.vertical.style.transparency,
                         seriesItem.errorbars.vertical.style.width,
                         seriesItem.errorbars.horizontal,
                         seriesItem.errorbars.horizontal.type,
                         seriesItem.errorbars.horizontal.valuetype,
                         seriesItem.errorbars.horizontal.noEndCap,
                         seriesItem.errorbars.horizontal.value,
                         seriesItem.errorbars.horizontal.custom,
                         seriesItem.errorbars.horizontal.custom.positive,
                         seriesItem.errorbars.horizontal.custom.negative,
                         seriesItem.errorbars.horizontal.style,
                         seriesItem.errorbars.horizontal.style.color,
                         seriesItem.errorbars.horizontal.style.transparency,
                         seriesItem.errorbars.horizontal.style.width,
                         seriesItem.errorbars.horizontal.style.dashStyle,
                         seriesItem.trendlines,
                         seriesItem.trendlines2,
                         seriesItem.trendlines3,
                         seriesItem.trendlines4,
                         seriesItem.trendlines5,
                         seriesItem.trendlines6,
                         seriesItem.trendlines7,
                         seriesItem.trendlines8,
                         seriesItem.trendlines9,
                         seriesItem.trendlines10,
                         seriesItem.trendlines11,
                         seriesItem.trendlines12,
                         seriesItem.trendlines13,
                         seriesItem.trendlines14,
                         seriesItem.trendlines15,
                         seriesItem.trendlines16,
                         seriesItem.trendlines17,
                         seriesItem.trendlines18,
                         seriesItem.chartType,
                         seriesItem.axisGroup,
                         seriesItem.backColor,
                         seriesItem.backColorTransparency,
                         seriesItem.border,
                         seriesItem.border.color,
                         seriesItem.border.lineType,
                         seriesItem.border.transparency,
                         seriesItem.border.width,
                         seriesItem.startAngle,
                         seriesItem.name,
                         seriesItem.xValues,
                         seriesItem.yValues,
                         seriesItem.bubbleSizes,
                         seriesItem.trendlines19,
                         seriesItem.bubbleSizes2,
                         seriesItem.dataLabels,
                         seriesItem.dataLabels.showValue,
                         seriesItem.dataLabels.showSeriesName,
                         seriesItem.dataLabels.showCategoryName,
                         seriesItem.dataLabels.showPercentage,
                         seriesItem.dataLabels.separator,
                         seriesItem.dataLabels.position,
                         seriesItem.dataLabels.format,
                         seriesItem.dataLabels.color,
                         seriesItem.dataLabels.transparency,
                         seriesItem.dataLabels.backColor,
                         seriesItem.dataLabels.backColorTransparency,
                         seriesItem.dataLabels.borderColor,
                         seriesItem.dataLabels.borderWidth,
                         seriesItem.dataLabels.borderColorTransparency);
    function set( 
       index : number,
       seriesItem : Object,
       seriesItem.symbol : Object,
       seriesItem.symbol.fill : string,
       seriesItem.symbol.fillColorTransparency : number,
       seriesItem.symbol.size : number,
       seriesItem.symbol.shape : SymbolShape,
       seriesItem.symbol.border : Object,
       seriesItem.symbol.border.color : string,
       seriesItem.symbol.border.colorTransparency : number,
       seriesItem.symbol.border.width : number,
       seriesItem.symbol.border.lineType : LineType,
       seriesItem.errorbars : Object,
       seriesItem.errorbars.vertical : Object,
       seriesItem.errorbars.vertical.type : ErrorBarType,
       seriesItem.errorbars.vertical.valuetype : ErrorBarValueType,
       seriesItem.errorbars.vertical.noEndCap : boolean,
       seriesItem.errorbars.vertical.value : number,
       seriesItem.errorbars.vertical.custom : Object,
       seriesItem.errorbars.vertical.custom.positive : string,
       seriesItem.errorbars.vertical.custom.negative : string,
       seriesItem.errorbars.vertical.style : Object,
       seriesItem.errorbars.vertical.style.color : string,
       seriesItem.errorbars.vertical.style.transparency : number,
       seriesItem.errorbars.vertical.style.width : number,
       seriesItem.errorbars.horizontal : Object,
       seriesItem.errorbars.horizontal.type : ErrorBarType,
       seriesItem.errorbars.horizontal.valuetype : ErrorBarValueType,
       seriesItem.errorbars.horizontal.noEndCap : boolean,
       seriesItem.errorbars.horizontal.value : number,
       seriesItem.errorbars.horizontal.custom : Object,
       seriesItem.errorbars.horizontal.custom.positive : string,
       seriesItem.errorbars.horizontal.custom.negative : string,
       seriesItem.errorbars.horizontal.style : Object,
       seriesItem.errorbars.horizontal.style.color : string,
       seriesItem.errorbars.horizontal.style.transparency : number,
       seriesItem.errorbars.horizontal.style.width : number,
       seriesItem.errorbars.horizontal.style.dashStyle : GC.Spread.Sheets.Charts.LineDashStyle,
       seriesItem.trendlines : undefined,
       seriesItem.trendlines2 : TrendlineType,
       seriesItem.trendlines3 : number,
       seriesItem.trendlines4 : number,
       seriesItem.trendlines5 : number,
       seriesItem.trendlines6 : number,
       seriesItem.trendlines7 : number,
       seriesItem.trendlines8 : boolean,
       seriesItem.trendlines9 : boolean,
       seriesItem.trendlines10 : string,
       seriesItem.trendlines11 : number,
       seriesItem.trendlines12 : string,
       seriesItem.trendlines13 : string,
       seriesItem.trendlines14 : Object,
       seriesItem.trendlines15 : string,
       seriesItem.trendlines16 : number,
       seriesItem.trendlines17 : number,
       seriesItem.trendlines18 : GC.Spread.Sheets.Charts.LineDashStyle,
       seriesItem.chartType : ChartType,
       seriesItem.axisGroup : AxisGroup,
       seriesItem.backColor : string,
       seriesItem.backColorTransparency : number,
       seriesItem.border : Object,
       seriesItem.border.color : string,
       seriesItem.border.lineType : GC.Spread.Sheets.Charts.LineDashStyle,
       seriesItem.border.transparency : number,
       seriesItem.border.width : number,
       seriesItem.startAngle : number,
       seriesItem.name : string,
       seriesItem.xValues : string,
       seriesItem.yValues : string,
       seriesItem.bubbleSizes : string,
       seriesItem.trendlines19 : Array,
       seriesItem.bubbleSizes2 : string,
       seriesItem.dataLabels : Object,
       seriesItem.dataLabels.showValue : boolean,
       seriesItem.dataLabels.showSeriesName : boolean,
       seriesItem.dataLabels.showCategoryName : boolean,
       seriesItem.dataLabels.showPercentage : boolean,
       seriesItem.dataLabels.separator : string,
       seriesItem.dataLabels.position : DataLabelPosition,
       seriesItem.dataLabels.format : string,
       seriesItem.dataLabels.color : string,
       seriesItem.dataLabels.transparency : number,
       seriesItem.dataLabels.backColor : string,
       seriesItem.dataLabels.backColorTransparency : number,
       seriesItem.dataLabels.borderColor : string,
       seriesItem.dataLabels.borderWidth : number,
       seriesItem.dataLabels.borderColorTransparency : number
    ) : any;

    Parameters

    index
    The index of the series.
    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.fillColorTransparency
    The transparency of the symbol fill color.
    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.colorTransparency
    The transparency of the symbol border color.
    seriesItem.symbol.border.width
    The symbol border width of the series.
    seriesItem.symbol.border.lineType
    The symbol border line Type of the series.
    seriesItem.errorbars
    The error bars of the series.
    seriesItem.errorbars.vertical
    The vertical error bar of the series, each series may has different direction error bar(s) based on chart type.
    seriesItem.errorbars.vertical.type
    The error bar type.
    seriesItem.errorbars.vertical.valuetype
    The error bar value type.
    seriesItem.errorbars.vertical.noEndCap
    The error bar has end cap or not.
    seriesItem.errorbars.vertical.value
    The error bar value, just take effect on the FixedValue(1) / Percentage(2) / StandardDeviation(3) value type.
    seriesItem.errorbars.vertical.custom
    The error bar custom formulas, it contains positive formula and negative formula, just take effect on the Custom(0) value type.
    seriesItem.errorbars.vertical.custom.positive
    The error bar custom positive formula.
    seriesItem.errorbars.vertical.custom.negative
    The error bar custom negative formula.
    seriesItem.errorbars.vertical.style
    The error bar styles.
    seriesItem.errorbars.vertical.style.color
    The error bar color.
    seriesItem.errorbars.vertical.style.transparency
    The error bar transparency.
    seriesItem.errorbars.vertical.style.width
    The error bar width.
    seriesItem.errorbars.horizontal
    The horizontal error bar of the series, each series may has different direction error bar(s) based on chart type.
    seriesItem.errorbars.horizontal.type
    The error bar type.
    seriesItem.errorbars.horizontal.valuetype
    The error bar value type.
    seriesItem.errorbars.horizontal.noEndCap
    The error bar has end cap or not.
    seriesItem.errorbars.horizontal.value
    The error bar value, just take effect on the FixedValue(1) / Percentage(2) / StandardDeviation(3) value type.
    seriesItem.errorbars.horizontal.custom
    The error bar custom formulas, it contains positive formula and negative formula, just take effect on the Custom(0) value type.
    seriesItem.errorbars.horizontal.custom.positive
    The error bar custom positive formula.
    seriesItem.errorbars.horizontal.custom.negative
    The error bar custom negative formula.
    seriesItem.errorbars.horizontal.style
    The error bar styles.
    seriesItem.errorbars.horizontal.style.color
    The error bar color.
    seriesItem.errorbars.horizontal.style.transparency
    The error bar transparency.
    seriesItem.errorbars.horizontal.style.width
    The error bar width.
    seriesItem.errorbars.horizontal.style.dashStyle
    The error bar dash style.
    seriesItem.trendlines
    The trendlines of the series.[0].type The type of the trendline.[0].order The order of the polynomial trendline.[0].period The period of the movingAverage trendline.[0].intercept The intercept of the trendline.[0].forward The forward of the trendline.[0].backward The backward of the trendline.[0].displayEquation Whether display the equation of the trendline.[0].displayRSquared Whether display the R squared of the trendline.[0].fontFamily The fontFamily of the trendline.[0].fontSize The fontSize of the trendline.[0].fontColor The fontColor of the trendline.[0].name The name of the trendline.[0].style The line style of the trendline.[0].style.color The color of the trendline.[0].style.transparency The transparency of the trendline.[0].style.width The width of the trendline.[0].style.dashStyle The dash style of the trendline.The trendlines of the series.
    seriesItem.trendlines2
    seriesItem.trendlines3
    seriesItem.trendlines4
    seriesItem.trendlines5
    seriesItem.trendlines6
    seriesItem.trendlines7
    seriesItem.trendlines8
    seriesItem.trendlines9
    seriesItem.trendlines10
    seriesItem.trendlines11
    seriesItem.trendlines12
    seriesItem.trendlines13
    seriesItem.trendlines14
    seriesItem.trendlines15
    seriesItem.trendlines16
    seriesItem.trendlines17
    seriesItem.trendlines18
    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.lineType
    The border line type of the series.
    seriesItem.border.transparency
    The transparency of the series border color.
    seriesItem.border.width
    The border width 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.The bubble sizes formula of the series. This is used for bubble chart.
    seriesItem.trendlines19
    seriesItem.bubbleSizes2
    seriesItem.dataLabels
    The data labels of the series.
    seriesItem.dataLabels.showValue
    Whether to show value in series data labels.
    seriesItem.dataLabels.showSeriesName
    Whether to show series name in series data labels.
    seriesItem.dataLabels.showCategoryName
    Whether to show category name in series data labels.
    seriesItem.dataLabels.showPercentage
    Whether to show the percent value in series data labels.
    seriesItem.dataLabels.separator
    the separator of the series data labels.
    seriesItem.dataLabels.position
    The position of the series data labels.
    seriesItem.dataLabels.format
    The format of the series data labels.
    seriesItem.dataLabels.color
    The text color of the series data labels.
    seriesItem.dataLabels.transparency
    The text color transparency of the series data labels.
    seriesItem.dataLabels.backColor
    The background color of the series data labels.
    seriesItem.dataLabels.backColorTransparency
    The background color transparency of the series data labels.
    seriesItem.dataLabels.borderColor
    The border color of the series data labels.
    seriesItem.dataLabels.borderWidth
    The border width of the series data labels.
    seriesItem.dataLabels.borderColorTransparency
    The border color transparency of the series data labels.
    Example
    // This example shows how to update the property of a series.
    var dataRange = "A1:D4";
    var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
    var series1 = chart.series().get(0);
    series1.backColor = "red";
    chart.series().set(0, series1);
    See Also