Represents a Trendline label.

Hierarchy

Hierarchy

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get border(): ChartBorder
  • Determines the appearance of the border drawn around the text area, as well as whether a border appears.

    Returns ChartBorder

  • set border(a: ChartBorder): void
  • Parameters

    Returns void

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

    See

    owner

    Returns WorksheetChart

  • get defaultFont(): IWorkbookFont
  • Defines the font properties for each formatted run in the text that has no more specific setting. Read-only.

    Use this object to apply font formatting to the entire run of text which comprises the chart or axis title.

    Font formatting can be applied to individual runs of text using the FormattedString.getFont method of the object returned from the text property. Any such formatting overrides that which is defined by the DefaultFont settings.

    Note: this property will return null until the ChartTitle is set on the WorksheetChart.ChartTitle property.

    See

    Returns IWorkbookFont

  • get displayEquation(): boolean
  • Returns or sets a boolean value indicating whether the default trendline equation is displayed within the label.

    See

    Trendline.label

    Returns boolean

  • set displayEquation(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get displayRSquared(): boolean
  • Returns or sets a boolean value indicating whether the default R-squared function is displayed within the label.

    See

    Trendline.label

    Returns boolean

  • set displayRSquared(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get fill(): ChartFillBase
  • Returns or sets a ChartFillBase derived object which defines the fill properties for the text area.

    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

    Returns ChartFillBase

  • set fill(a: ChartFillBase): void
  • Parameters

    Returns void

  • get formula(): Formula
  • The formula used to get the text displayed within the text area. (read-only). To set this property call the SetFormula method.

    See

    setFormula

    Returns Formula

  • get horizontalOverflow(): TextHorizontalOverflow
  • Determines whether text is allowed to continue horizontally outside the bounds of the containing element.

    Returns TextHorizontalOverflow

  • set horizontalOverflow(a: TextHorizontalOverflow): void
  • Parameters

    Returns void

  • get left(): number
  • The left position of the text area (ignored unless position is set to 'Custom').

    The value of this property is expressed as a fractional value between 0 and 1 which represents the ratio of the offset to the width of the chart element.

    For example, a value of 0 positions the text area as close as possible to the edge of the chart element; a value of 1 positions it as close as possible to the opposite edge. All values in between 0 and 1 represent a scalar which, when applied to the width of the entire chart element, yields the offset.

    See

    position

    Returns number

  • set left(a: number): void
  • Parameters

    • a: number

    Returns void

  • get numberFormat(): string
  • Returns or sets the format to use for numbers.

    See

    numberFormatLinked

    Returns string

  • set numberFormat(a: string): void
  • Parameters

    • a: string

    Returns void

  • get numberFormatLinked(): boolean
  • True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).

    See

    numberFormat

    Returns boolean

  • set numberFormatLinked(a: boolean): 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 position(): ElementPosition
  • Determines whether the position of the text area is automatic or custom as specified by the left and top properties.

    Returns ElementPosition

  • set position(a: ElementPosition): void
  • Parameters

    Returns void

  • get readingOrder(): ReadingOrder
  • Determines the reading order

    Returns ReadingOrder

  • set readingOrder(a: ReadingOrder): void
  • Parameters

    Returns void

  • get rotation(): number
  • Determines the rotation of the text area, expressed in degrees.

    Returns number

  • set rotation(a: number): void
  • Parameters

    • a: number

    Returns void

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

    Returns Sheet

  • get text(): FormattedString
  • Returns or sets a FormattedString object which defines the text to be displayed by the associated chart element.

    Because mixed font settings are supported for chart element text, a special object is required to customize the text.

    For the simple case where all the text has the same formatting, create an instance of the FormattedString class, specifiying the text as the value of the 'unformattedString' parameter.

    To apply font attributes to a given run of text, i.e., a substring within the text, use the FormattedString.getFont method, and set the applicable properties of the FormattedStringFont instance returned from the GetFont method.

    See

    Returns FormattedString

  • set text(a: FormattedString): void
  • Parameters

    Returns void

  • get textDirection(): TextDirection
  • Determines the orientation and direction in which text flows.

    Note that the rotation property is only applicable when this property is set to Horizontal.

    See

    rotation

    Returns TextDirection

  • set textDirection(a: TextDirection): void
  • Parameters

    Returns void

  • get top(): number
  • The top position of the text area (ignored unless position is set to 'Custom').

    The value of this property is expressed as a fractional value between 0 and 1 which represents the ratio of the offset to the height of the associated chart element.

    For example, a value of 0 positions the title as close as possible to the edge of the associated chart element; a value of 1 positions it as close as possible to the opposite edge. All values in between 0 and 1 represent a scalar which, when applied to the height of the entire chart element, yields the offset.

    See

    position

    Returns number

  • set top(a: number): void
  • Parameters

    • a: number

    Returns void

  • get verticalAlignment(): VerticalTitleAlignment
  • Determines the vertical alignment of the text area.

    Returns VerticalTitleAlignment

  • set verticalAlignment(a: VerticalTitleAlignment): void
  • Parameters

    Returns void

  • get verticalOverflow(): TextVerticalOverflow
  • Determines whether text is allowed to continue vertically outside the bounds of the containing element.

    Returns TextVerticalOverflow

  • set verticalOverflow(a: TextVerticalOverflow): void
  • Parameters

    Returns void

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

    Returns Workbook

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

    Returns Worksheet

  • get wrapText(): boolean
  • Determines whether text is wrapped when it would exceed the bounds of the containing element.

    Returns boolean

  • set wrapText(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

Methods

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Assigns a new Formula to this instance.

    See

    text

    Parameters

    • formula: string

      The string representation of the formula used to get the text.

    • Optional cellReferenceMode: CellReferenceMode

      A CellReferenceMode value which specifies whether the 'formula' parameter should be interpreted as an A1 or R1C1 expression. This parameter is optional and defaults to null, in which case the Workbook.cellReferenceMode property is used.

    Returns void

  • 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

  • Returns void