Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScaleTrack

Track for visualising the domain/reference scale

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

labelBounds

labelBounds: LabelBounds

Optional legendUpdate

legendUpdate: LegendTriggerFunction

loader

loader: D3Selection

options

order

order: number

Protected plotGroup

plotGroup: D3Selection

scale

scale: Scale

ticks

ticks: number[]

transform

transform: Transform

xscale

xscale: Scale

Accessors

data

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

extent

  • get extent(): [number, number] | number[]

isLoading

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

isMounted

  • get isMounted(): boolean

Methods

createRuler

createTicks

  • createTicks(): void

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

plot

  • plot(): void

refresh

  • refresh(): void

Generated using TypeDoc