Function scaleLog

  • Constructs a new continuous scale with the specified range, the base 10, the default interpolator and clamping disabled. The domain defaults to [1, 10]. If range is not specified, it defaults to [0, 1].

    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. The third generic corresponds to the data type of the unknown value.

    If range element and output element type differ, the interpolator factory used with the scale must match this behavior 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 = number

    • Output = Range

    • Unknown = never

    Parameters

    • Optional range: Iterable<Range>

      Array of range values.

    Returns ScaleLogarithmic<Range, Output, Unknown>

  • Constructs a new continuous scale with the specified domain and range, 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. The third generic corresponds to the data type of the unknown value.

    If range element and output element type differ, the interpolator factory used with the scale must match this behavior 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 = Range

    • Unknown = never

    Parameters

    • domain: Iterable<NumberValue>

      Array of numeric domain values.

    • range: Iterable<Range>

      Array of range values.

    Returns ScaleLogarithmic<Range, Output, Unknown>