ExcelScript.ChartTitle interface

Represents a chart title object of a chart.

Methods

getFormat()

Represents the formatting of a chart title, which includes fill and font formatting.

getHeight()

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

getHorizontalAlignment()

Specifies the horizontal alignment for chart title.

getLeft()

Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is null if the chart title is not visible.

getOverlay()

Specifies if the chart title will overlay the chart.

getPosition()

Represents the position of chart title. See ExcelScript.ChartTitlePosition for details.

getShowShadow()

Represents a boolean value that determines if the chart title has a shadow.

getSubstring(start, length)

Get the substring of a chart title. Line break '\n' counts one character.

getText()

Specifies the chart's title text.

getTextOrientation()

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

getTop()

Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is null if the chart title is not visible.

getVerticalAlignment()

Specifies the vertical alignment of chart title. See ExcelScript.ChartTextVerticalAlignment for details.

getVisible()

Specifies if the chart title is visible.

getWidth()

Specifies the width, in points, of the chart title. Value is null if the chart title is not visible.

setFormula(formula)

Sets a string value that represents the formula of chart title using A1-style notation.

setHorizontalAlignment(horizontalAlignment)

Specifies the horizontal alignment for chart title.

setLeft(left)

Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is null if the chart title is not visible.

setOverlay(overlay)

Specifies if the chart title will overlay the chart.

setPosition(position)

Represents the position of chart title. See ExcelScript.ChartTitlePosition for details.

setShowShadow(showShadow)

Represents a boolean value that determines if the chart title has a shadow.

setText(text)

Specifies the chart's title text.

setTextOrientation(textOrientation)

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

setTop(top)

Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is null if the chart title is not visible.

setVerticalAlignment(verticalAlignment)

Specifies the vertical alignment of chart title. See ExcelScript.ChartTextVerticalAlignment for details.

setVisible(visible)

Specifies if the chart title is visible.

Method Details

getFormat()

Represents the formatting of a chart title, which includes fill and font formatting.

getFormat(): ChartTitleFormat;

Returns

getHeight()

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

getHeight(): number;

Returns

number

getHorizontalAlignment()

Specifies the horizontal alignment for chart title.

getHorizontalAlignment(): ChartTextHorizontalAlignment;

Returns

getLeft()

Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is null if the chart title is not visible.

getLeft(): number;

Returns

number

getOverlay()

Specifies if the chart title will overlay the chart.

getOverlay(): boolean;

Returns

boolean

getPosition()

Represents the position of chart title. See ExcelScript.ChartTitlePosition for details.

getPosition(): ChartTitlePosition;

Returns

getShowShadow()

Represents a boolean value that determines if the chart title has a shadow.

getShowShadow(): boolean;

Returns

boolean

getSubstring(start, length)

Get the substring of a chart title. Line break '\n' counts one character.

getSubstring(start: number, length: number): ChartFormatString;

Parameters

start

number

Start position of substring to be retrieved. Zero-indexed.

length

number

Length of the substring to be retrieved.

Returns

getText()

Specifies the chart's title text.

getText(): string;

Returns

string

getTextOrientation()

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

getTextOrientation(): number;

Returns

number

getTop()

Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is null if the chart title is not visible.

getTop(): number;

Returns

number

getVerticalAlignment()

Specifies the vertical alignment of chart title. See ExcelScript.ChartTextVerticalAlignment for details.

getVerticalAlignment(): ChartTextVerticalAlignment;

Returns

getVisible()

Specifies if the chart title is visible.

getVisible(): boolean;

Returns

boolean

getWidth()

Specifies the width, in points, of the chart title. Value is null if the chart title is not visible.

getWidth(): number;

Returns

number

setFormula(formula)

Sets a string value that represents the formula of chart title using A1-style notation.

setFormula(formula: string): void;

Parameters

formula

string

A string that represents the formula to set.

Returns

void

setHorizontalAlignment(horizontalAlignment)

Specifies the horizontal alignment for chart title.

setHorizontalAlignment(
            horizontalAlignment: ChartTextHorizontalAlignment
        ): void;

Parameters

Returns

void

setLeft(left)

Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is null if the chart title is not visible.

setLeft(left: number): void;

Parameters

left

number

Returns

void

setOverlay(overlay)

Specifies if the chart title will overlay the chart.

setOverlay(overlay: boolean): void;

Parameters

overlay

boolean

Returns

void

setPosition(position)

Represents the position of chart title. See ExcelScript.ChartTitlePosition for details.

setPosition(position: ChartTitlePosition): void;

Parameters

Returns

void

setShowShadow(showShadow)

Represents a boolean value that determines if the chart title has a shadow.

setShowShadow(showShadow: boolean): void;

Parameters

showShadow

boolean

Returns

void

setText(text)

Specifies the chart's title text.

setText(text: string): void;

Parameters

text

string

Returns

void

setTextOrientation(textOrientation)

Specifies the angle to which the text is oriented for the chart title. 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)

Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is null if the chart title is not visible.

setTop(top: number): void;

Parameters

top

number

Returns

void

setVerticalAlignment(verticalAlignment)

Specifies the vertical alignment of chart title. See ExcelScript.ChartTextVerticalAlignment for details.

setVerticalAlignment(
            verticalAlignment: ChartTextVerticalAlignment
        ): void;

Parameters

Returns

void

setVisible(visible)

Specifies if the chart title is visible.

setVisible(visible: boolean): void;

Parameters

visible

boolean

Returns

void