Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • QuantitativeScale<QuantitativeValue, number>
    • LogScale

Index

Constructors

constructor

  • Returns LogScale

Properties

Protected Optional bindDomainValue

bindDomainValue?: string

Protected Optional bindRangeValue

bindRangeValue?: Dimension

Protected Optional clampValue

clampValue?: boolean

Protected defaultZero

defaultZero: boolean = false

Protected Optional domainValue

domainValue?: DomainCreator<[QuantitativeValue, QuantitativeValue]>

Protected Optional nameValue

nameValue?: string

Protected Optional niceValue

niceValue?: string | number | boolean | Record<string, any>

Protected Optional paddingValue

paddingValue?: number

Protected Optional rangeValue

rangeValue?: (args: ScaleCreationContext) => [number, number]

Type declaration

    • (args: ScaleCreationContext): [number, number]
    • Parameters

      • args: ScaleCreationContext

      Returns [number, number]

Protected Optional reverseValue

reverseValue?: boolean

Protected Optional roundValue

roundValue?: boolean

Protected Optional zeroValue

zeroValue?: boolean

Accessors

Protected bindDomainArray

  • get bindDomainArray(): string[]

Protected defaultDomain

  • get defaultDomain(): [QuantitativeValue, QuantitativeValue]

Protected defaultRange

  • get defaultRange(): Range

Methods

Protected addCommonProperties

  • addCommonProperties(scale: any): void

base

build

  • build(arg: ScaleCreationContext): Scales
  • Parameters

    • arg: ScaleCreationContext

    Returns Scales

clamp

  • A boolean indicating if output values should be clamped to the range (default false). If clamping is disabled and the scale is passed a value outside the domain, the scale may return a value outside the range through extrapolation. If clamping is enabled, the output value of the scale is always within the scale’s range.

    Parameters

    • Optional value: boolean

    Returns LogScale

Protected createScale

  • createScale(args: ScaleCreationContext): Scales

domain

  • domain(arg?: string | [QuantitativeValue, QuantitativeValue] | DomainCreator<[QuantitativeValue, QuantitativeValue]>): LogScale
  • Sets the domain of the scale

    Parameters

    • Optional arg: string | [QuantitativeValue, QuantitativeValue] | DomainCreator<[QuantitativeValue, QuantitativeValue]>

      The domain argument

    Returns LogScale

Protected domainContainsZero

  • domainContainsZero(domain: [QuantitativeValue, QuantitativeValue]): boolean

Protected getDomain

  • getDomain(args: ScaleCreationContext): [QuantitativeValue, QuantitativeValue]
  • Parameters

    • args: ScaleCreationContext

    Returns [QuantitativeValue, QuantitativeValue]

Protected getRange

  • getRange(args: ScaleCreationContext): [number, number]

Protected getZero

  • getZero(): boolean

Protected handleRangeBind

  • handleRangeBind(args: ScaleCreationContext, rangeBind: Dimension): [number, number]

name

  • Sets the name of the scale

    Parameters

    • Optional value: string

      The name of the scale

    Returns LogScale

nice

  • nice(value?: string | number | boolean | Record<string, any>): LogScale
  • Extends the domain so that it starts and ends on nice round values.

    Parameters

    • Optional value: string | number | boolean | Record<string, any>

    Returns LogScale

padding

  • padding(paddingValue?: number): LogScale
  • Adjusts the range of the scale to account for a pixel-padding on each end.

    Parameters

    • Optional paddingValue: number

      The number of pixels to pad each end of the scale's range with.

    Returns LogScale

Protected processDomainValues

  • processDomainValues(rawValues: any[]): [QuantitativeValue, QuantitativeValue]
  • Ensure that the domain is fully positive or negative

    Parameters

    • rawValues: any[]

    Returns [QuantitativeValue, QuantitativeValue]

range

  • range(arg?: Dimension | [number, number] | ((args: ScaleCreationContext) => [number, number])): LogScale
  • Parameters

    • Optional arg: Dimension | [number, number] | ((args: ScaleCreationContext) => [number, number])

    Returns LogScale

reverse

Protected reverseRange

  • reverseRange(range: [number, number]): [number, number]
  • Parameters

    • range: [number, number]

    Returns [number, number]

round

zero

  • Boolean flag indicating if the scale domain should include zero. The default value is true for linear, sqrt and pow, and false otherwise.

    Parameters

    • Optional value: boolean

    Returns LogScale