Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SvgTrack

Base track for tracks that renders SVG content

Hierarchy

Index

Constructors

constructor

Properties

Protected _data

_data: any

Protected _isLoading

_isLoading: boolean

Protected _mounted

_mounted: boolean

elm

elm: HTMLElement

error

error: Error | string

id

id: string | number

Optional legendUpdate

legendUpdate: LegendTriggerFunction

loader

loader: D3Selection

options

options: TrackOptions

order

order: number

Protected plotGroup

plotGroup: D3Selection

scale

scale: Scale

transform

transform: Transform

Accessors

data

  • get data(): any
  • set data(data: Promise<any> | Function | any): void

isLoading

  • get isLoading(): boolean
  • set isLoading(val: boolean): void

isMounted

  • get isMounted(): boolean

Methods

init

  • init(elm: HTMLElement, scale: Scale): void
  • Calls OnMount and OnUpdate. Useful if track is stand-alone

    Parameters

    • elm: HTMLElement
    • scale: Scale

    Returns void

loadData

  • loadData(data: any, showLoader?: boolean): void
  • Initiate loading of data for track. Will set response to the track's data property. If showLoader is set to true, the current track will be hidden, and (if supplied) the loader element will be shown, until data is resolved. Calls onDataLoaded if implemented by track.

    Parameters

    • data: any
    • Default value showLoader: boolean = true

    Returns void

onDataLoaded

  • onDataLoaded(data?: any): void

onError

  • onError(error: Error | string): void
  • Should be called from track implementation in case an unrecoverable error occurs.

    Parameters

    • error: Error | string

    Returns void

onMount

onRescale

onUnmount

  • Handler for onUnmount event. Called when track DOM-element is remove from the DOM model. Typically, trackEvent will be an empty object, but depends on container.

    Parameters

    Returns void

onUpdate

refresh

  • refresh(): void

Generated using TypeDoc