ExcelScript.ChartTrendlineLabel interface

This object represents the attributes for a chart trendline label object.

Methods

getAutoText()

Specifies if the trendline label automatically generates appropriate text based on context.

getFormat()

The format of the chart trendline label.

getFormula()

String value that represents the formula of the chart trendline label using A1-style notation.

getHeight()

Returns the height, in points, of the chart trendline label. Value is null if the chart trendline label is not visible.

getHorizontalAlignment()

Represents the horizontal alignment of the chart trendline label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when TextOrientation of a trendline label is -90, 90, or 180.

getLeft()

Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is null if the chart trendline label is not visible.

getLinkNumberFormat()

Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).

getNumberFormat()

String value that represents the format code for the trendline label.

getText()

String representing the text of the trendline label on a chart.

getTextOrientation()

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

getTop()

Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is null if the chart trendline label is not visible.

getVerticalAlignment()

Represents the vertical alignment of the chart trendline label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of a trendline label is 0.

getWidth()

Returns the width, in points, of the chart trendline label. Value is null if the chart trendline label is not visible.

setAutoText(autoText)

Specifies if the trendline label automatically generates appropriate text based on context.

setFormula(formula)

String value that represents the formula of the chart trendline label using A1-style notation.

setHorizontalAlignment(horizontalAlignment)

Represents the horizontal alignment of the chart trendline label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when TextOrientation of a trendline label is -90, 90, or 180.

setLeft(left)

Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is null if the chart trendline label is not visible.

setLinkNumberFormat(linkNumberFormat)

Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).

setNumberFormat(numberFormat)

String value that represents the format code for the trendline label.

setText(text)

String representing the text of the trendline label on a chart.

setTextOrientation(textOrientation)

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

setTop(top)

Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is null if the chart trendline label is not visible.

setVerticalAlignment(verticalAlignment)

Represents the vertical alignment of the chart trendline label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of a trendline label is 0.

Method Details

getAutoText()

Specifies if the trendline label automatically generates appropriate text based on context.

getAutoText(): boolean;

Returns

boolean

getFormat()

The format of the chart trendline label.

getFormat(): ChartTrendlineLabelFormat;

Returns

getFormula()

String value that represents the formula of the chart trendline label using A1-style notation.

getFormula(): string;

Returns

string

getHeight()

Returns the height, in points, of the chart trendline label. Value is null if the chart trendline label is not visible.

getHeight(): number;

Returns

number

getHorizontalAlignment()

Represents the horizontal alignment of the chart trendline label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when TextOrientation of a trendline label is -90, 90, or 180.

getHorizontalAlignment(): ChartTextHorizontalAlignment;

Returns

getLeft()

Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is null if the chart trendline label is not visible.

getLeft(): number;

Returns

number

getLinkNumberFormat()

Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).

getLinkNumberFormat(): boolean;

Returns

boolean

getNumberFormat()

String value that represents the format code for the trendline label.

getNumberFormat(): string;

Returns

string

getText()

String representing the text of the trendline label on a chart.

getText(): string;

Returns

string

getTextOrientation()

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

getTextOrientation(): number;

Returns

number

getTop()

Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is null if the chart trendline label is not visible.

getTop(): number;

Returns

number

getVerticalAlignment()

Represents the vertical alignment of the chart trendline label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of a trendline label is 0.

getVerticalAlignment(): ChartTextVerticalAlignment;

Returns

getWidth()

Returns the width, in points, of the chart trendline label. Value is null if the chart trendline label is not visible.

getWidth(): number;

Returns

number

setAutoText(autoText)

Specifies if the trendline label automatically generates appropriate text based on context.

setAutoText(autoText: boolean): void;

Parameters

autoText

boolean

Returns

void

setFormula(formula)

String value that represents the formula of the chart trendline label using A1-style notation.

setFormula(formula: string): void;

Parameters

formula

string

Returns

void

setHorizontalAlignment(horizontalAlignment)

Represents the horizontal alignment of the chart trendline label. See ExcelScript.ChartTextHorizontalAlignment for details. This property is valid only when TextOrientation of a trendline label is -90, 90, or 180.

setHorizontalAlignment(
            horizontalAlignment: ChartTextHorizontalAlignment
        ): void;

Parameters

Returns

void

setLeft(left)

Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is null if the chart trendline label is not visible.

setLeft(left: number): void;

Parameters

left

number

Returns

void

setLinkNumberFormat(linkNumberFormat)

Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).

setLinkNumberFormat(linkNumberFormat: boolean): void;

Parameters

linkNumberFormat

boolean

Returns

void

setNumberFormat(numberFormat)

String value that represents the format code for the trendline label.

setNumberFormat(numberFormat: string): void;

Parameters

numberFormat

string

Returns

void

setText(text)

String representing the text of the trendline label on a chart.

setText(text: string): void;

Parameters

text

string

Returns

void

setTextOrientation(textOrientation)

Represents the angle to which the text is oriented for the chart trendline label. 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

setTop(top)

Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is null if the chart trendline label is not visible.

setTop(top: number): void;

Parameters

top

number

Returns

void

setVerticalAlignment(verticalAlignment)

Represents the vertical alignment of the chart trendline label. See ExcelScript.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of a trendline label is 0.

setVerticalAlignment(
            verticalAlignment: ChartTextVerticalAlignment
        ): void;

Parameters

Returns

void