Represents the legend in a chart. Each chart can have only one legend.
Constructors
Section titled "Constructors"Legend
new Legend(): Legend Returns Legend
Properties
Section titled "Properties"$t: Type Accessors
Section titled "Accessors"border
Section titled "border"Determines the appearance of the border drawn around the text area, as well as whether a border appears.
get border(): ChartBorder
Returns ChartBorder
chart
Section titled "chart"Inherited from: ChartObject
defaultFont
Section titled "defaultFont"Defines the font properties for legend entries which have no specific font settings. Read-only.
get defaultFont(): IWorkbookFont
Returns IWorkbookFont
defaultFontFill
Section titled "defaultFontFill"Returns or sets a [[ChartFillBase]] derived object which defines the font color(s) for legend entries.
get defaultFontFill(): ChartFillBase
Returns ChartFillBase
Returns or sets a [[ChartFillBase]] derived object which defines the fill properties for the legend's text area.
get fill(): ChartFillBase
Returns ChartFillBase
height
Section titled "height"Returns or sets a value that represents the height of the legend area, expressed as a fraction of the chart area's height.
get height(): number
Returns number
set height(a: number): void Parameters
- a:
number
Returns void
Returns or sets a value that represents the position of the left edge of the legend area, expressed as a fraction of the chart area's width.
get left(): number
Returns number
set left(a: number): void Parameters
- a:
number
Returns void
overlay
Section titled "overlay"Returns or sets a boolean value indicating whether the legend can intersect with the chart's plot area.
get overlay(): boolean
Returns boolean
set overlay(a: boolean): void Parameters
- a:
boolean
Returns void
owner
Section titled "owner"Inherited from: ChartObject
returns this object's owner. (read-only) The owner or null if this object is owned directly by the Chart
get owner(): ChartObject
Returns ChartObject
position
Section titled "position"Returns or sets a value that represents the position of the legend on the chart.
get position(): LegendPosition
Returns LegendPosition
rotation
Section titled "rotation"Determines the rotation of the legend's text area, expressed in degrees.
get rotation(): number
Returns number
set rotation(a: number): void Parameters
- a:
number
Returns void
sheet
Section titled "sheet"Inherited from: ChartObject
textDirection
Section titled "textDirection"Determines the orientation and direction in which text flows.
get textDirection(): TextDirection
Returns TextDirection
Returns or sets a value that represents the position of the top edge of the legend area, expressed as a fraction of the chart area's height.
get top(): number
Returns number
set top(a: number): void Parameters
- a:
number
Returns void
width
Section titled "width"Returns or sets a value that represents the width of the legend area, expressed as a fraction of the chart area's width.
get width(): number
Returns number
set width(a: number): void Parameters
- a:
number
Returns void
workbook
Section titled "workbook"Inherited from: ChartObject
worksheet
Section titled "worksheet"Inherited from: ChartObject
Methods
Section titled "Methods"legendEntries
Section titled "legendEntries"Indexer (read-only)
legendEntries(index: number): LegendEntry Parameters
- index:
numberA zero based index