SpreadJS Documentation
GC.Spread.Sheets.Charts Namespace / Chart type / dataLabels Method
The chart data labels style of the chart.
Whether to show value in data labels.
Whether to show series name in data labels.
Whether to show category name in data labels.
Whether to show the percent value in data labels.
The position of the chart data labels.
The format of the chart data labels.
The color of the chart data labels.
The transparency of the chart data labels color.
In This Topic
    dataLabels Method
    In This Topic
    Gets or sets the chart data labels style of the chart.
    Syntax
    var instance = new GC.Spread.Sheets.Charts.Chart(sheet, name, chartType, x, y, width, height, dataRange, dataOrientation);
    var returnValue; // Type: any
    returnValue = instance.dataLabels(value,
                                      value.showValue,
                                      value.showSeriesName,
                                      value.showCategoryName,
                                      value.showPercentage,
                                      value.position,
                                      value.format,
                                      value.color,
                                      value.transparency);
    function dataLabels( 
       value : Object,
       value.showValue : boolean,
       value.showSeriesName : boolean,
       value.showCategoryName : boolean,
       value.showPercentage : boolean,
       value.position : DataLabelPosition,
       value.format : string,
       value.color : string,
       value.transparency : number
    ) : any;

    Parameters

    value
    The chart data labels style of the chart.
    value.showValue
    Whether to show value in data labels.
    value.showSeriesName
    Whether to show series name in data labels.
    value.showCategoryName
    Whether to show category name in data labels.
    value.showPercentage
    Whether to show the percent value in data labels.
    value.position
    The position of the chart data labels.
    value.format
    The format of the chart data labels.
    value.color
    The color of the chart data labels.
    value.transparency
    The transparency of the chart data labels color.

    Return Value

    If no value is set, returns the chart data labels style of the chart; otherwise, returns the chart.
    Remarks

    The following table lists all the other parameters that can be used while getting or setting the data label styles of the chart.

    Parameter Type Description
    value.showValue boolean Whether to show value in data labels.
    value.showSeriesName boolean Whether to show series name in data labels.
    value.showCategoryName boolean Whether to show category name in data labels.
    value.showPercentage boolean Whether to show the percent value in data labels.
    value.position - The position of the chart data labels.
    value.format string The format of the chart data labels.
    value.color string The color of the chart data labels.


    See Also

    Reference

    Chart type