WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

scaleImplicit

scaleImplicit: object

A special value for ordinal.unknown that enables implicit domain construction: unknown values are implicitly added to the domain.

Type declaration

  • name: "implicit"

schemeCategory10

schemeCategory10: string[]

An array of ten categorical colors represented as RGB hexadecimal strings.

schemeCategory20

schemeCategory20: string[]

An array of twenty categorical colors represented as RGB hexadecimal strings.

schemeCategory20b

schemeCategory20b: string[]

An array of twenty categorical colors represented as RGB hexadecimal strings.

schemeCategory20c

schemeCategory20c: string[]

An array of twenty categorical colors represented as RGB hexadecimal strings. This color scale includes color specifications and designs developed by Cynthia Brewer (colorbrewer2.org).

Functions

interpolateCool

  • interpolateCool(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from Niccoli’s perceptual rainbow, represented as an RGB string.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

interpolateCubehelixDefault

  • interpolateCubehelixDefault(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from Green’s default Cubehelix represented as an RGB string.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

interpolateInferno

  • interpolateInferno(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from the “inferno” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

interpolateMagma

  • interpolateMagma(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from the “magma” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

interpolatePlasma

  • interpolatePlasma(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from the “plasma” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

interpolateRainbow

  • interpolateRainbow(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from d3.interpolateWarm scale from [0.0, 0.5] followed by the d3.interpolateCool scale from [0.5, 1.0], thus implementing the cyclical less-angry rainbow color scheme.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

interpolateViridis

  • interpolateViridis(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from the “viridis” perceptually-uniform color scheme designed by van der Walt, Smith and Firing for matplotlib, represented as an RGB string.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

interpolateWarm

  • interpolateWarm(t: number): string
  • Given a number t in the range [0,1], returns the corresponding color from a 180° rotation of Niccoli’s perceptual rainbow, represented as an RGB string.

    Parameters

    • t: number

      A number in the interval [0, 1].

    Returns string

scaleBand

  • Constructs a new band scale with the empty domain, the unit range [0, 1], no padding, no rounding and center alignment.

    Returns ScaleBand<string>

  • Constructs a new band scale with the empty domain, the unit range [0, 1], no padding, no rounding and center alignment.

    The generic correponds to the data type of domain elements.

    Type parameters

    • Domain: object

    Returns ScaleBand<Domain>

scaleIdentity

  • Constructs a new identity scale with the unit domain [0, 1] and the unit range [0, 1].

    Returns ScaleIdentity

scaleLinear

  • Constructs a new continuous linear scale with the unit domain [0, 1], the unit range [0, 1], the default interpolator and clamping disabled.

    The scale will have range and output of data type number.

    Returns ScaleLinear<number, number>

  • Constructs a new continuous linear scale with the unit domain [0, 1], the default interpolator and clamping disabled.

    The generic correponds to the data type of the range and output elements to be used.

    As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Output

    Returns ScaleLinear<Output, Output>

  • Constructs a new continuous linear scale with the unit domain [0, 1], the default interpolator and clamping disabled.

    The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the output elements generated by the scale.

    If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and convert the interpolated range element to a corresponding output element.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Range

    • Output

    Returns ScaleLinear<Range, Output>

scaleLog

  • Constructs a new continuous logarithmic scale with the domain [1, 10], the unit range [0, 1], the base 10, the default interpolator and clamping disabled.

    The scale will have range and output of data type number.

    Returns ScaleLogarithmic<number, number>

  • Constructs a new continuous logarithmic scale with the domain [1, 10], the base 10, the default interpolator and clamping disabled.

    The generic correponds to the data type of the range and output elements to be used.

    As range type and output type are the same, the interpolator factory used with the scale must match this behaviour.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Output

    Returns ScaleLogarithmic<Output, Output>

  • Constructs a new continuous logarithmic scale with the domain [1, 10], the base 10, the default interpolator and clamping disabled.

    The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the output elements generated by the scale.

    If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and convert the interpolated range element to a corresponding output element.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Range

    • Output

    Returns ScaleLogarithmic<Range, Output>

scaleOrdinal

  • scaleOrdinal<Range>(range?: Range[]): ScaleOrdinal<string, Range>
  • scaleOrdinal<Domain, Range>(range?: Range[]): ScaleOrdinal<Domain, Range>
  • Constructs a new ordinal scale with an empty domain and the specified range. If a range is not specified, it defaults to the empty array; an ordinal scale always returns undefined until a non-empty range is defined.

    By default, the domain is configured to generate implicitly, if the scale is invoked with an unknown value. See the "unknown(...)" method of the scale to change this behavior.

    The generic corresponds to the data type of range elements.

    parm

    range An optional array of range values to initialize the scale with.

    Type parameters

    • Range

    Parameters

    • Optional range: Range[]

    Returns ScaleOrdinal<string, Range>

  • Constructs a new ordinal scale with an empty domain and the specified range. If a range is not specified, it defaults to the empty array; an ordinal scale always returns undefined until a non-empty range is defined.

    By default, the domain is configured to generate implicitly, if the scale is invoked with an unknown value. See the "unknown(...)" method of the scale to change this behavior.

    The first generic corresponds to the data type of domain elements. The second generic corresponds to the data type of range elements.

    parm

    range An optional array of range values to initialize the scale with.

    Type parameters

    • Domain: object

    • Range

    Parameters

    • Optional range: Range[]

    Returns ScaleOrdinal<Domain, Range>

scalePoint

  • Constructs a new point scale with the empty domain, the unit range [0, 1], no padding, no rounding and center alignment.

    Returns ScalePoint<string>

  • Constructs a new point scale with the empty domain, the unit range [0, 1], no padding, no rounding and center alignment.

    The generic corresponds to the data type of domain elements.

    Type parameters

    • Domain: object

    Returns ScalePoint<Domain>

scalePow

  • Constructs a new continuous power scale with the unit domain [0, 1], the unit range [0, 1], the exponent 1, the default interpolator and clamping disabled. (Note that this is effectively a linear scale until you set a different exponent.)

    The scale will have range and output of data type number.

    Returns ScalePower<number, number>

  • Constructs a new continuous power scale with the unit domain [0, 1], the exponent 1, the default interpolator and clamping disabled. (Note that this is effectively a linear scale until you set a different exponent.)

    The generic correponds to the data type of the range and output elements to be used.

    As range type and output type are the same, the interpolator factory used with the scale must match this behaviour.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Output

    Returns ScalePower<Output, Output>

  • Constructs a new continuous power scale with the unit domain [0, 1], the exponent 1, the default interpolator and clamping disabled. (Note that this is effectively a linear scale until you set a different exponent.)

    The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the output elements generated by the scale.

    If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and convert the interpolated range element to a corresponding output element.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Range

    • Output

    Returns ScalePower<Range, Output>

scaleQuantile

  • Constructs a new quantile scale with an empty domain and an empty range. The quantile scale is invalid until both a domain and range are specified.

    Returns ScaleQuantile<number>

  • Constructs a new quantile scale with an empty domain and an empty range. The quantile scale is invalid until both a domain and range are specified.

    The generic correponds to the data type of range elements.

    Type parameters

    • Range

    Returns ScaleQuantile<Range>

scaleQuantize

  • Constructs a new quantize scale with the unit domain [0, 1] and the unit range [0, 1]. Thus, the default quantize scale is equivalent to the Math.round function.

    Returns ScaleQuantize<number>

  • Constructs a new quantize scale with the unit domain [0, 1].

    The range must be set corresponding to the type of the range elements.

    The generic corresponds to the data type of the range elements.

    Type parameters

    • Range

    Returns ScaleQuantize<Range>

scaleSequential

  • Constructs a new sequential scale with the given interpolator function. When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the start of the domain, and 1 represents the end of the domain.

    The generic corresponds to the data type of the output of the interpolator underlying the scale.

    Type parameters

    • Output

    Parameters

    • interpolator: function

      The interpolator function to be used with the scale.

        • (t: number): Output
        • Parameters

          • t: number

          Returns Output

    Returns ScaleSequential<Output>

scaleSqrt

  • Constructs a new continuous power scale with the unit domain [0, 1], the unit range [0, 1], the exponent 0.5, the default interpolator and clamping disabled. This is a convenience method equivalent to d3.scalePow().exponent(0.5).

    The scale will have range and output of data type number.

    Returns ScalePower<number, number>

  • Constructs a new continuous power scale with the unit domain [0, 1], the exponent 0.5, the default interpolator and clamping disabled. This is a convenience method equivalent to d3.scalePow().exponent(0.5).

    The generic correponds to the data type of the range and output elements to be used.

    As range type and output type are the same, the interpolator factory used with the scale must match this behaviour.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Output

    Returns ScalePower<Output, Output>

  • Constructs a new continuous power scale with the unit domain [0, 1], the exponent 0.5, the default interpolator and clamping disabled. This is a convenience method equivalent to d3.scalePow().exponent(0.5).

    The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the output elements generated by the scale.

    If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and convert the interpolated range element to a corresponding output element.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Range

    • Output

    Returns ScalePower<Range, Output>

scaleThreshold

  • Constructs a new threshold scale with the default domain [0.5] and the default range [0, 1]. Thus, the default threshold scale is equivalent to the Math.round function for numbers; for example threshold(0.49) returns 0, and threshold(0.51) returns 1.

    Returns ScaleThreshold<number, number>

  • Constructs a new threshold scale. The domain and range must be set corresponding to the type of the corresponding generic.

    The first generic corresponds to the data type of domain values. The second generic corresponds to the data type of range values.

    Type parameters

    • Domain: number | string | Date

    • Range

    Returns ScaleThreshold<Domain, Range>

scaleTime

  • scaleTime(): ScaleTime<number, number>
  • scaleTime<Output>(): ScaleTime<Output, Output>
  • scaleTime<Range, Output>(): ScaleTime<Range, Output>
  • Constructs a new time scale using local time with the domain [2000-01-01, 2000-01-02], the unit range [0, 1], the default interpolator and clamping disabled.

    The scale will have range and output of data type number.

    Returns ScaleTime<number, number>

  • Constructs a new time scale using local time with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled.

    The generic correponds to the data type of the range and output elements to be used.

    As range type and output type are the same, the interpolator factory used with the scale must match this behaviour.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Output

    Returns ScaleTime<Output, Output>

  • Constructs a new time scale using local time with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled.

    The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the output elements generated by the scale.

    If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and convert the interpolated range element to a corresponding output element.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Range

    • Output

    Returns ScaleTime<Range, Output>

scaleUtc

  • scaleUtc(): ScaleTime<number, number>
  • scaleUtc<Output>(): ScaleTime<Output, Output>
  • scaleUtc<Range, Output>(): ScaleTime<Range, Output>
  • Constructs a new time scale using Coordinated Universal Time (UTC) with the domain [2000-01-01, 2000-01-02], the unit range [0, 1], the default interpolator and clamping disabled.

    The scale will have range and output of data type number.

    Returns ScaleTime<number, number>

  • Constructs a new time scale using Coordinated Universal Time (UTC) with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled.

    The generic correponds to the data type of the range and output elements to be used.

    As range type and output type are the same, the interpolator factory used with the scale must match this behaviour.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Output

    Returns ScaleTime<Output, Output>

  • Constructs a new time scale using Coordinated Universal Time (UTC) with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled.

    The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the output elements generated by the scale.

    If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and convert the interpolated range element to a corresponding output element.

    The range must be set in accordance with the range element type.

    The interpolator factory may be set using the interpolate(...) method of the scale.

    Type parameters

    • Range

    • Output

    Returns ScaleTime<Range, Output>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc