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

scaleLinear

Constructs a new continuous scale with the specified range, the default interpolator and clamping disabled. The domain defaults to [0, 1]. 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.

function scaleLinear<Range = number, Output = Range, Unknown = never>(range?: Iterable<Range>): ScaleLinear<Range, Output, Unknown>;
function scaleLinear<Range, Output = Range, Unknown = never>(domain: Iterable<NumberValue>, range: Iterable<Range>): ScaleLinear<Range, Output, Unknown>;
§
scaleLinear<Range = number, Output = Range, Unknown = never>(range?: Iterable<Range>): ScaleLinear<Range, Output, Unknown>
[src]

Constructs a new continuous scale with the specified range, the default interpolator and clamping disabled. The domain defaults to [0, 1]. 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
[src]
§
Output = Range
[src]
§
Unknown = never
[src]

§Parameters

§
range?: Iterable<Range> optional
[src]

Array of range values.

§Return Type

§
ScaleLinear<Range, Output, Unknown>
[src]
§
scaleLinear<Range, Output = Range, Unknown = never>(domain: Iterable<NumberValue>, range: Iterable<Range>): ScaleLinear<Range, Output, Unknown>
[src]

Constructs a new continuous scale with the specified domain and range, 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
[src]
§
Output = Range
[src]
§
Unknown = never
[src]

§Parameters

§
domain: Iterable<NumberValue>
[src]

Array of numeric domain values.

§
range: Iterable<Range>
[src]

Array of range values.

§Return Type

§
ScaleLinear<Range, Output, Unknown>
[src]