ExcelScript.ChartLegend interface

Represents the legend in a chart.

Methods

getFormat()

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

getHeight()

Specifies the height, in points, of the legend on the chart. Value is null if the legend is not visible.

getLeft()

Specifies the left value, in points, of the legend on the chart. Value is null if the legend is not visible.

getLegendEntries()

Represents a collection of legendEntries in the legend.

getOverlay()

Specifies if the chart legend should overlap with the main body of the chart.

getPosition()

Specifies the position of the legend on the chart. See ExcelScript.ChartLegendPosition for details.

getShowShadow()

Specifies if the legend has a shadow on the chart.

getTop()

Specifies the top of a chart legend.

getVisible()

Specifies if the chart legend is visible.

getWidth()

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

setHeight(height)

Specifies the height, in points, of the legend on the chart. Value is null if the legend is not visible.

setLeft(left)

Specifies the left value, in points, of the legend on the chart. Value is null if the legend is not visible.

setOverlay(overlay)

Specifies if the chart legend should overlap with the main body of the chart.

setPosition(position)

Specifies the position of the legend on the chart. See ExcelScript.ChartLegendPosition for details.

setShowShadow(showShadow)

Specifies if the legend has a shadow on the chart.

setTop(top)

Specifies the top of a chart legend.

setVisible(visible)

Specifies if the chart legend is visible.

setWidth(width)

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

Method Details

getFormat()

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

getFormat(): ChartLegendFormat;

Returns

getHeight()

Specifies the height, in points, of the legend on the chart. Value is null if the legend is not visible.

getHeight(): number;

Returns

number

getLeft()

Specifies the left value, in points, of the legend on the chart. Value is null if the legend is not visible.

getLeft(): number;

Returns

number

getLegendEntries()

Represents a collection of legendEntries in the legend.

getLegendEntries(): ChartLegendEntry[];

Returns

getOverlay()

Specifies if the chart legend should overlap with the main body of the chart.

getOverlay(): boolean;

Returns

boolean

getPosition()

Specifies the position of the legend on the chart. See ExcelScript.ChartLegendPosition for details.

getPosition(): ChartLegendPosition;

Returns

getShowShadow()

Specifies if the legend has a shadow on the chart.

getShowShadow(): boolean;

Returns

boolean

getTop()

Specifies the top of a chart legend.

getTop(): number;

Returns

number

getVisible()

Specifies if the chart legend is visible.

getVisible(): boolean;

Returns

boolean

getWidth()

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

getWidth(): number;

Returns

number

setHeight(height)

Specifies the height, in points, of the legend on the chart. Value is null if the legend is not visible.

setHeight(height: number): void;

Parameters

height

number

Returns

void

setLeft(left)

Specifies the left value, in points, of the legend on the chart. Value is null if the legend is not visible.

setLeft(left: number): void;

Parameters

left

number

Returns

void

setOverlay(overlay)

Specifies if the chart legend should overlap with the main body of the chart.

setOverlay(overlay: boolean): void;

Parameters

overlay

boolean

Returns

void

setPosition(position)

Specifies the position of the legend on the chart. See ExcelScript.ChartLegendPosition for details.

setPosition(position: ChartLegendPosition): void;

Parameters

Returns

void

setShowShadow(showShadow)

Specifies if the legend has a shadow on the chart.

setShowShadow(showShadow: boolean): void;

Parameters

showShadow

boolean

Returns

void

setTop(top)

Specifies the top of a chart legend.

setTop(top: number): void;

Parameters

top

number

Returns

void

setVisible(visible)

Specifies if the chart legend is visible.

setVisible(visible: boolean): void;

Parameters

visible

boolean

Returns

void

setWidth(width)

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

setWidth(width: number): void;

Parameters

width

number

Returns

void