Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

scaleSequential

Constructs a new sequential scale with the specified interpolator function or array. The domain defaults to [0, 1]. If interpolator is not specified, it defaults to the identity function. When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the minimum value and 1 represents the maximum value.

If interpolator is an array, it represents the scale’s two-element output range and is converted to an interpolator function using d3.interpolate.

The first generic corresponds to the data type of the output of the interpolator underlying the scale. The second generic corresponds to the data type of the unknown value.

function scaleSequential<Output = number, Unknown = never>(interpolator?: ((t: number) => Output) | Iterable<Output>): ScaleSequential<Output, Unknown>;
function scaleSequential<Output, Unknown = never>(domain: Iterable<NumberValue>, interpolator: ((t: number) => Output) | Iterable<Output>): ScaleSequential<Output, Unknown>;
§
scaleSequential<Output = number, Unknown = never>(interpolator?: ((t: number) => Output) | Iterable<Output>): ScaleSequential<Output, Unknown>
[src]

Constructs a new sequential scale with the specified interpolator function or array. The domain defaults to [0, 1]. If interpolator is not specified, it defaults to the identity function. When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the minimum value and 1 represents the maximum value.

If interpolator is an array, it represents the scale’s two-element output range and is converted to an interpolator function using d3.interpolate.

The first generic corresponds to the data type of the output of the interpolator underlying the scale. The second generic corresponds to the data type of the unknown value.

§Type Parameters

§
Output = number
[src]
§
Unknown = never
[src]

§Parameters

§
interpolator?: ((t: number) => Output) | Iterable<Output> optional
[src]

The interpolator function or array to be used with the scale.

§Return Type

§
ScaleSequential<Output, Unknown>
[src]
§
scaleSequential<Output, Unknown = never>(domain: Iterable<NumberValue>, interpolator: ((t: number) => Output) | Iterable<Output>): ScaleSequential<Output, Unknown>
[src]

Constructs a new sequential scale with the specified domain and interpolator function or array. When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the minimum value and 1 represents the maximum value.

If interpolator is an array, it represents the scale’s two-element output range and is converted to an interpolator function using d3.interpolate.

The first generic corresponds to the data type of the output of the interpolator underlying the scale. The second generic corresponds to the data type of the unknown value.

§Type Parameters

§
Output
[src]
§
Unknown = never
[src]

§Parameters

§
domain: Iterable<NumberValue>
[src]

A two-element array of numeric domain values.

§
interpolator: ((t: number) => Output) | Iterable<Output>
[src]

The interpolator function or array to be used with the scale.

§Return Type

§
ScaleSequential<Output, Unknown>
[src]