Components Interactions Examples Tutorials API FAQ
Options
Menu

Class QuantitativeScale

Type parameters

  • D

Hierarchy

Implements

Index

Constructors

constructor

Properties

Private _domainMax

_domainMax: any

Private _domainMin

_domainMin: any

Private _padProportion

_padProportion: any

Private _paddingExceptionsProviders

_paddingExceptionsProviders: any

Private _snappingDomainEnabled

_snappingDomainEnabled: any

Private _tickGenerator

_tickGenerator: any

Static Protected _DEFAULT_NUM_TICKS

_DEFAULT_NUM_TICKS: number

Methods

Protected _autoDomainIfAutomaticMode

  • _autoDomainIfAutomaticMode(): void

Protected _backingScaleDomain

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

Protected _defaultExtent

  • _defaultExtent(): D[]

Protected _dispatchUpdate

  • _dispatchUpdate(): void

Protected _expandSingleValueDomain

  • _expandSingleValueDomain(singleValueDomain: D[]): D[]

Protected _getAllIncludedValues

  • _getAllIncludedValues(): D[]

Protected _getDomain

  • _getDomain(): D[]

Protected _getExtent

  • _getExtent(): D[]

Protected _getRange

  • _getRange(): number[]

Protected _niceDomain

  • _niceDomain(domain: D[], count?: number): D[]
  • Given a domain, expands its domain onto "nice" values, e.g. whole numbers.

    Parameters

    • domain: D[]
    • Optional count: number

    Returns D[]

Private _padDomain

  • _padDomain(domain: any): any

Protected _setDomain

  • _setDomain(values: D[]): void

Protected _setRange

  • _setRange(values: number[]): void

addIncludedValuesProvider

addPaddingExceptionsProvider

  • Adds a padding exception provider. If one end of the domain is set to an excepted value as a result of autoDomain()-ing, that end of the domain will not be padded.

    Parameters

autoDomain

  • autoDomain()

defaultTicks

  • defaultTicks(): D[]
  • Gets the array of tick values generated by the default algorithm.

    Returns D[]

domain

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

domainMax

  • domainMax(): D
  • domainMax(domainMax: D)

domainMin

  • domainMin(): D
  • domainMin(domainMin: D)

extentOfValues

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

getTransformationDomain

  • getTransformationDomain(): [number, number]

invert

  • invert(value: number): D
  • Computes the domain value corresponding to a supplied range value.

    Parameters

    • value: number

    Returns D

    The domain value corresponding to the supplied range value.

invertedTransformation

  • invertedTransformation(value: number): number

offUpdate

onUpdate

padProportion

  • padProportion(): number
  • padProportion(padProportion: number)
  • Gets the padding proportion.

    Returns number

  • Sets the padding porportion. When autoDomain()-ing, the computed domain will be expanded by this proportion, then rounded to human-readable values.

    Parameters

    • padProportion: number

      The padding proportion. Passing 0 disables padding.

pan

  • pan(translateAmount: number): void

range

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

removeIncludedValuesProvider

removePaddingExceptionsProvider

scale

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

    Parameters

    • value: D

    Returns number

    The range value corresponding to the supplied domain value.

scaleTransformation

  • scaleTransformation(value: number): number

snappingDomainEnabled

  • snappingDomainEnabled(): boolean
  • snappingDomainEnabled(snappingDomainEnabled: boolean)
  • Gets whether or not the scale snaps its domain to nice values.

    Returns boolean

  • Sets whether or not the scale snaps its domain to nice values.

    Parameters

    • snappingDomainEnabled: boolean

tickGenerator

ticks

  • ticks(): D[]
  • Gets an array of tick values spanning the domain.

    Returns D[]

zoom

  • zoom(magnifyAmount: number, centerValue: number): void

Generated using TypeDoc