Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Scale

Type parameters

  • D

  • R

Hierarchy

Index

Constructors

constructor

  • A Scale is a function (in the mathematical sense) that maps values from a domain to a range.

    constructor

    Returns Scale

Properties

Private _autoDomainAutomatically

_autoDomainAutomatically: any

Private _callbacks

_callbacks: any

Private _domainModificationInProgress

_domainModificationInProgress: any

Private _includedValuesProviders

_includedValuesProviders: any

Methods

Protected _autoDomainIfAutomaticMode

  • _autoDomainIfAutomaticMode(): void

Protected _backingScaleDomain

  • _backingScaleDomain(): D[]
  • _backingScaleDomain(values: D[])

Protected _dispatchUpdate

  • _dispatchUpdate(): void

Protected _getAllIncludedValues

  • _getAllIncludedValues(): D[]

Protected _getDomain

  • _getDomain(): D[]

Protected _getExtent

  • _getExtent(): D[]

Protected _getRange

  • _getRange(): R[]

Protected _setDomain

  • _setDomain(values: D[]): void

Protected _setRange

  • _setRange(values: R[]): void

addIncludedValuesProvider

autoDomain

  • autoDomain()
  • Sets the Scale's domain so that it spans the Extents of all its ExtentsProviders.

domain

  • domain(): D[]
  • domain(values: D[])

extentOfValues

  • extentOfValues(values: D[]): D[]
  • Given an array of potential domain values, computes the extent of those values.

    Parameters

    • values: D[]

    Returns D[]

    The extent of the input values.

offUpdate

onUpdate

range

  • range(): R[]
  • range(values: R[])

removeIncludedValuesProvider

scale

  • scale(value: D): R
  • Computes the range value corresponding to a given domain value.

    Parameters

    • value: D

    Returns R

    The range value corresponding to the supplied domain value.

Generated using TypeDoc