Options
All
  • Public
  • Public/Protected
  • All
Menu

Base class for legends in the SciChart library

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected backgroundColorProperty

backgroundColorProperty: string

Protected div

div: HTMLDivElement

Protected eventListenersCollection

eventListenersCollection: Map<string, IEventSubscriptionItem[]> = new Map<string,IEventSubscriptionItem[]>()

Protected invalidateParentSurface

invalidateParentSurface: () => void

Type declaration

    • (): void
    • Returns void

Protected isDirty

isDirty: boolean = true

Protected marginProperty

marginProperty: number = 10

Protected orientationProperty

orientationProperty: ELegendOrientation = ELegendOrientation.Vertical

Protected parentDiv

parentDiv: HTMLDivElement

Protected parentSurfaceProperty

parentSurfaceProperty: ISciChartSurfaceBase

Protected placementDivIdProperty

placementDivIdProperty: string | HTMLDivElement

Protected placementProperty

placementProperty: ELegendPlacement = ELegendPlacement.TopLeft

Protected rootDiv

rootDiv: HTMLDivElement

Protected showLegendProperty

showLegendProperty: boolean = true

Protected textColorProperty

textColorProperty: string

Readonly Abstract type

Accessors

backgroundColor

  • get backgroundColor(): string
  • set backgroundColor(value: string): void
  • Gets or sets the backgroundColor as an html color code

    Returns string

  • Gets or sets the backgroundColor as an html color code

    Parameters

    • value: string

    Returns void

margin

  • get margin(): number
  • set margin(value: number): void
  • Gets or sets the margin in pixels

    Returns number

  • Gets or sets the margin in pixels

    Parameters

    • value: number

    Returns void

orientation

  • Gets and sets the legend orientation. See ELegendOrientation for a list of values

    Returns ELegendOrientation

  • Gets and sets the legend orientation. See ELegendOrientation for a list of values

    Parameters

    Returns void

placement

  • Gets or sets the legend placement. See ELegendPlacement for a list of values

    Returns ELegendPlacement

  • Gets or sets the legend placement. See ELegendPlacement for a list of values

    Parameters

    Returns void

placementDivId

  • get placementDivId(): string | HTMLDivElement
  • set placementDivId(value: string | HTMLDivElement): void
  • Gets or sets the parent div element reference or id for the Legend

    Returns string | HTMLDivElement

  • Gets or sets the parent div element reference or id for the Legend

    Parameters

    • value: string | HTMLDivElement

    Returns void

showLegend

  • get showLegend(): boolean
  • set showLegend(value: boolean): void
  • When true, the legend is shown, else it is hidden

    Returns boolean

  • When true, the legend is shown, else it is hidden

    Parameters

    • value: boolean

    Returns void

textColor

  • get textColor(): string
  • set textColor(value: string): void
  • Gets or sets the textColor as an html color code

    Returns string

  • Gets or sets the textColor as an html color code

    Parameters

    • value: string

    Returns void

Methods

Protected Abstract addEventListeners

  • addEventListeners(): void
  • When overridden in a derived class, will be called when its time to add event listeners to series

    Returns void

Abstract applyTheme

  • applyTheme(): void
  • inheritdoc

    Returns void

attachTo

  • Attach this legend to a SciChartSurfaceBase

    Parameters

    Returns void

clear

  • clear(): void
  • Returns void

Protected create

  • create(): void
  • Creates the legend in the DOM

    Returns void

delete

  • delete(): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    remarks

    Call .delete() before finishing with the object to ensure that WebAssmembly memory leaks do not occur.

    All elements within SciChart's High Performance Realtime JavaScript Charts which implement IDeletable must be deleted manually to free native (WebAssembly) memory

    Returns void

detach

  • detach(): void
  • Returns void

Protected Abstract getInnerHTML

  • getInnerHTML(): string
  • Gets the HTML to place inside the legend, for example could be several rows of series names, markers

    Returns string

getLegendHTML

getLegendItemHTML

  • Gets HTML string for legend items

    Parameters

    Returns string

Protected getParentDiv

  • getParentDiv(): HTMLDivElement
  • Returns HTMLDivElement

invalidateLegend

  • invalidateLegend(): void
  • Invalidate the legend, hinting a redraw is needed

    Returns void

isExternal

  • isExternal(): boolean
  • Gets if the Legend in placed externally

    Returns boolean

Protected notifyPropertyChanged

  • notifyPropertyChanged(): void
  • Notifies listeners of invalidateParentSurface that a property has changed

    Returns void

Protected removeEventListenerFromSeries

  • removeEventListenerFromSeries(renderableSeriesId: string): void
  • removes event listeners from a specific IRenderableSeries series

    Parameters

    • renderableSeriesId: string

    Returns void

Protected Abstract removeEventListeners

  • removeEventListeners(): void
  • When overridden in a derived class, will be called when its time to remove event listeners from series

    Returns void

setInvalidateParentSurface

  • setInvalidateParentSurface(value: () => void): void
  • Parameters

    • value: () => void
        • (): void
        • Returns void

    Returns void

setParentSurface

setRootDiv

  • setRootDiv(rootDivProperty: HTMLDivElement): void
  • Set the root div in HTML where the legend will be placed

    Parameters

    • rootDivProperty: HTMLDivElement

    Returns void

setSeriesViewRect

  • setSeriesViewRect(seriesViewRect: Rect): void
  • deprecated

    Parameters

    • seriesViewRect: Rect

    Returns void

update

  • update(): void
  • Update the legend

    Returns void

Generated using TypeDoc