SpreadJS Documentation
GC.Spread.Sheets.Charts Namespace / DataPoints type / set Method
The index of the dataPoint.
The data point of the chart.
The color of the data point.
The transparency of the data point color.
In This Topic
    set Method
    In This Topic
    Updates the specified dataPoint's property.
    Syntax
    var instance = new GC.Spread.Sheets.Charts.DataPoints();
    var value; // Type: any
    value = instance.set(index, dataPoint, dataPoint.fillColor, dataPoint.transparency);
    function set( 
       index : number,
       dataPoint : Object,
       dataPoint.fillColor : string,
       dataPoint.transparency : number
    ) : any;

    Parameters

    index
    The index of the dataPoint.
    dataPoint
    The data point of the chart.
    dataPoint.fillColor
    The color of the data point.
    dataPoint.transparency
    The transparency of the data point color.
    Example
    // This example shows how to update the property of a dataPoint
    var dataRange = new GC.Spread.Sheets.Range(0, 0, 16, 4);
    var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.sunburst, 250, 20, 600, 400, dataRange);
    var dataPoints = chart.series().dataPoints();
    var dataPoint = {fillColor: 'rgba(255,255,0,0,7)'};
    dataPoints.set(0, dataPoint);
    See Also

    Reference

    DataPoints type