Represents a legend entry in a chart legend.

NOTE: Legend entries are not supported for the following chart types:

  • Box and Whisker
  • Histogram
  • Pareto
  • Sunburst
  • Treemap
  • Waterfall

Hierarchy

Hierarchy (view full)

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get chart(): WorksheetChart
  • Returns the owning chart (read-only)

    See

    [[owner]]

    Returns WorksheetChart

  • get font(): IWorkbookFont
  • Returns or sets the font for this legend entry. Read-only.

    This property provides a way to specify font settings for a particular legend entry; to apply font settings to all legend entries, use the [[Legend.defaultFont]] property.

    See

    [[Legend.defaultFont]]

    Returns IWorkbookFont

  • get fontFill(): ChartFillBase
  • Returns or sets a [[ChartFillBase]] derived object which defines the font color(s) for this legend entry.

    This property returns null by default, indicating that no fill is applied.

    To apply a solid color fill, assign an instance of the [[ChartSolidFill]] class to this property.

    To apply a gradient fill, assign an instance of the [[ChartGradientFill]] class to this property.

    See

    • [[ChartSolidFill]]
    • [[ChartGradientFill]]

    Returns ChartFillBase

  • set fontFill(a): void
  • Parameters

    Returns void

  • get isDeleted(): boolean
  • Returns or sets a boolean value indicating whether this entry has been removed from the [[WorksheetChart.legend]]

    Deletion does not remove the entry from the [[Legend.legendEntries]] collection, but rather marks it as deleted, so that it does not appear in the legend.

    See

    • [[WorksheetChart.legend]]
    • [[legend]]
    • [[Trendline.legendEntry]]

    Returns boolean

  • set isDeleted(a): void
  • Parameters

    • a: boolean

    Returns void

  • get owner(): ChartObject
  • returns this object's owner. (read-only) The owner or null if this object is owned directly by the Chart

    See

    [[chart]]

    Returns ChartObject

  • get sheet(): Sheet
  • The owning sheet (read-only)

    Returns Sheet

  • get workbook(): Workbook
  • The owning workbook (read-only)

    Returns Workbook

  • get worksheet(): Worksheet
  • The owning worksheet (read-only)

    Returns Worksheet

Methods

  • Marks the entry as being deleted.

    Returns void

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Returns Base

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean