Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Category

Hierarchy

  • Scale<string, number>
    • Category

Implements

Index

Constructors

constructor

Properties

Private _d3Scale

_d3Scale: any

Private _d3TransformationScale

_d3TransformationScale: any

An additional linear scale to apply pan/zoom interactions to the category scale. Pan/zoom requires a numerically invertable scale.

This adds an intermediate coordinate space called the Transformation Space. The conversion from data to screen coordinates is as follows:

Data Space -> _d3Scale -> Transformation Space -> _d3TransformationScale -> Screen Space.

The Transformation Space coordinates are initialized to [0, 1].

Notably, range band calculations are internally computed in Transformation Space and transformed to screen space in methods like rangeBand() and stepWidth().

Private _innerPadding

_innerPadding: any

Private _outerPadding

_outerPadding: any

Private _range

_range: any

Methods

Protected _autoDomainIfAutomaticMode

  • _autoDomainIfAutomaticMode(): void

Protected _backingScaleDomain

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

Protected _dispatchUpdate

  • _dispatchUpdate(): void

Protected _getAllIncludedValues

  • _getAllIncludedValues(): string[]

Protected _getDomain

  • _getDomain(): string[]

Protected _getExtent

  • _getExtent(): string[]

Protected _getRange

  • _getRange(): number[]

Protected _rescaleBand

  • _rescaleBand(band: number): number
  • Converts a width or height in Transformation Space into Screen Space.

    Parameters

    • band: number

    Returns number

Private _setBands

  • _setBands(): any

Protected _setDomain

  • _setDomain(values: string[]): void

Protected _setRange

  • _setRange(values: number[]): void

addIncludedValuesProvider

autoDomain

  • autoDomain()

domain

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

extentOfValues

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

getTransformationDomain

  • getTransformationDomain(): [number, number]

innerPadding

  • innerPadding(): number
  • innerPadding(innerPadding: number)
  • Gets the inner padding.

    The inner padding is defined as the padding in between bands on the scale, expressed as a multiple of the rangeBand().

    Returns number

  • Sets the inner padding.

    The inner padding is defined as the padding in between bands on the scale, expressed as a multiple of the rangeBand().

    Parameters

    • innerPadding: number

invertedTransformation

  • invertedTransformation(value: number): number

offUpdate

onUpdate

outerPadding

  • outerPadding(): number
  • outerPadding(outerPadding: number)
  • Gets the outer padding.

    The outer padding is the padding in between the outer bands and the edges of the range, expressed as a multiple of the rangeBand().

    Returns number

  • Sets the outer padding.

    The outer padding is the padding in between the outer bands and the edges of the range, expressed as a multiple of the rangeBand().

    Parameters

    • outerPadding: number

pan

  • pan(translateAmount: number): void

range

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

rangeBand

  • rangeBand(): number
  • Returns the width of the range band.

    Returns number

    The range band width

removeIncludedValuesProvider

scale

  • scale(value: string): number

scaleTransformation

  • scaleTransformation(value: number): number

stepWidth

  • stepWidth(): number
  • Returns the step width of the scale.

    The step width is the pixel distance between adjacent values in the domain.

    Returns number

zoom

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

Static Private _convertToPlottableInnerPadding

  • _convertToPlottableInnerPadding(d3InnerPadding: any): any

Static Private _convertToPlottableOuterPadding

  • _convertToPlottableOuterPadding(d3OuterPadding: any, d3InnerPadding: any): any
  • Parameters

    • d3OuterPadding: any
    • d3InnerPadding: any

    Returns any

Generated using TypeDoc