ExcelScript.ChartDataLabels interface

Represents a collection of all the data labels on a chart point.

Methods

getAutoText()

Specifies if data labels automatically generate appropriate text based on context.

getFormat()

Specifies the format of chart data labels, which includes fill and font formatting.

getHorizontalAlignment()

Specifies the horizontal alignment for chart data label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when the TextOrientation of data label is 0.

getLinkNumberFormat()

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

getNumberFormat()

Specifies the format code for data labels.

getPosition()

Value that represents the position of the data label. See ExcelScript.ChartDataLabelPosition for details.

getSeparator()

String representing the separator used for the data labels on a chart.

getShowBubbleSize()

Specifies if the data label bubble size is visible.

getShowCategoryName()

Specifies if the data label category name is visible.

getShowLegendKey()

Specifies if the data label legend key is visible.

getShowPercentage()

Specifies if the data label percentage is visible.

getShowSeriesName()

Specifies if the data label series name is visible.

getShowValue()

Specifies if the data label value is visible.

getTextOrientation()

Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

getVerticalAlignment()

Represents the vertical alignment of chart data label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of the data label is -90, 90, or 180.

setAutoText(autoText)

Specifies if data labels automatically generate appropriate text based on context.

setHorizontalAlignment(horizontalAlignment)

Specifies the horizontal alignment for chart data label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when the TextOrientation of data label is 0.

setLinkNumberFormat(linkNumberFormat)

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

setNumberFormat(numberFormat)

Specifies the format code for data labels.

setPosition(position)

Value that represents the position of the data label. See ExcelScript.ChartDataLabelPosition for details.

setSeparator(separator)

String representing the separator used for the data labels on a chart.

setShowBubbleSize(showBubbleSize)

Specifies if the data label bubble size is visible.

setShowCategoryName(showCategoryName)

Specifies if the data label category name is visible.

setShowLegendKey(showLegendKey)

Specifies if the data label legend key is visible.

setShowPercentage(showPercentage)

Specifies if the data label percentage is visible.

setShowSeriesName(showSeriesName)

Specifies if the data label series name is visible.

setShowValue(showValue)

Specifies if the data label value is visible.

setTextOrientation(textOrientation)

Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

setVerticalAlignment(verticalAlignment)

Represents the vertical alignment of chart data label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of the data label is -90, 90, or 180.

Method Details

getAutoText()

Specifies if data labels automatically generate appropriate text based on context.

getAutoText(): boolean;

Returns

boolean

getFormat()

Specifies the format of chart data labels, which includes fill and font formatting.

getFormat(): ChartDataLabelFormat;

Returns

getHorizontalAlignment()

Specifies the horizontal alignment for chart data label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when the TextOrientation of data label is 0.

getHorizontalAlignment(): ChartTextHorizontalAlignment;

Returns

getLinkNumberFormat()

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

getLinkNumberFormat(): boolean;

Returns

boolean

getNumberFormat()

Specifies the format code for data labels.

getNumberFormat(): string;

Returns

string

getPosition()

Value that represents the position of the data label. See ExcelScript.ChartDataLabelPosition for details.

getPosition(): ChartDataLabelPosition;

Returns

getSeparator()

String representing the separator used for the data labels on a chart.

getSeparator(): string;

Returns

string

getShowBubbleSize()

Specifies if the data label bubble size is visible.

getShowBubbleSize(): boolean;

Returns

boolean

getShowCategoryName()

Specifies if the data label category name is visible.

getShowCategoryName(): boolean;

Returns

boolean

getShowLegendKey()

Specifies if the data label legend key is visible.

getShowLegendKey(): boolean;

Returns

boolean

getShowPercentage()

Specifies if the data label percentage is visible.

getShowPercentage(): boolean;

Returns

boolean

getShowSeriesName()

Specifies if the data label series name is visible.

getShowSeriesName(): boolean;

Returns

boolean

getShowValue()

Specifies if the data label value is visible.

getShowValue(): boolean;

Returns

boolean

getTextOrientation()

Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

getTextOrientation(): number;

Returns

number

getVerticalAlignment()

Represents the vertical alignment of chart data label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of the data label is -90, 90, or 180.

getVerticalAlignment(): ChartTextVerticalAlignment;

Returns

setAutoText(autoText)

Specifies if data labels automatically generate appropriate text based on context.

setAutoText(autoText: boolean): void;

Parameters

autoText

boolean

Returns

void

setHorizontalAlignment(horizontalAlignment)

Specifies the horizontal alignment for chart data label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when the TextOrientation of data label is 0.

setHorizontalAlignment(
            horizontalAlignment: ChartTextHorizontalAlignment
        ): void;

Parameters

Returns

void

setLinkNumberFormat(linkNumberFormat)

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

setLinkNumberFormat(linkNumberFormat: boolean): void;

Parameters

linkNumberFormat

boolean

Returns

void

setNumberFormat(numberFormat)

Specifies the format code for data labels.

setNumberFormat(numberFormat: string): void;

Parameters

numberFormat

string

Returns

void

setPosition(position)

Value that represents the position of the data label. See ExcelScript.ChartDataLabelPosition for details.

setPosition(position: ChartDataLabelPosition): void;

Parameters

Returns

void

setSeparator(separator)

String representing the separator used for the data labels on a chart.

setSeparator(separator: string): void;

Parameters

separator

string

Returns

void

setShowBubbleSize(showBubbleSize)

Specifies if the data label bubble size is visible.

setShowBubbleSize(showBubbleSize: boolean): void;

Parameters

showBubbleSize

boolean

Returns

void

setShowCategoryName(showCategoryName)

Specifies if the data label category name is visible.

setShowCategoryName(showCategoryName: boolean): void;

Parameters

showCategoryName

boolean

Returns

void

setShowLegendKey(showLegendKey)

Specifies if the data label legend key is visible.

setShowLegendKey(showLegendKey: boolean): void;

Parameters

showLegendKey

boolean

Returns

void

setShowPercentage(showPercentage)

Specifies if the data label percentage is visible.

setShowPercentage(showPercentage: boolean): void;

Parameters

showPercentage

boolean

Returns

void

setShowSeriesName(showSeriesName)

Specifies if the data label series name is visible.

setShowSeriesName(showSeriesName: boolean): void;

Parameters

showSeriesName

boolean

Returns

void

setShowValue(showValue)

Specifies if the data label value is visible.

setShowValue(showValue: boolean): void;

Parameters

showValue

boolean

Returns

void

setTextOrientation(textOrientation)

Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

setTextOrientation(textOrientation: number): void;

Parameters

textOrientation

number

Returns

void

setVerticalAlignment(verticalAlignment)

Represents the vertical alignment of chart data label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of the data label is -90, 90, or 180.

setVerticalAlignment(
            verticalAlignment: ChartTextVerticalAlignment
        ): void;

Parameters

Returns

void