ExcelScript.ChartLegend interface
Represents the legend in a chart.
Methods
get |
Represents the formatting of a chart legend, which includes fill and font formatting. |
get |
Specifies the height, in points, of the legend on the chart. Value is |
get |
Specifies the left value, in points, of the legend on the chart. Value is |
get |
Represents a collection of legendEntries in the legend. |
get |
Specifies if the chart legend should overlap with the main body of the chart. |
get |
Specifies the position of the legend on the chart. See |
get |
Specifies if the legend has a shadow on the chart. |
get |
Specifies the top of a chart legend. |
get |
Specifies if the chart legend is visible. |
get |
Specifies the width, in points, of the legend on the chart. Value is |
set |
Specifies the height, in points, of the legend on the chart. Value is |
set |
Specifies the left value, in points, of the legend on the chart. Value is |
set |
Specifies if the chart legend should overlap with the main body of the chart. |
set |
Specifies the position of the legend on the chart. See |
set |
Specifies if the legend has a shadow on the chart. |
set |
Specifies the top of a chart legend. |
set |
Specifies if the chart legend is visible. |
set |
Specifies the width, in points, of the legend on the chart. Value is |
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
- position
- ExcelScript.ChartLegendPosition
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
Office Scripts