Skip to content

Documentation / @ripl/core / scaleQuantize

Function: scaleQuantize() ​

scaleQuantize<TRange>(domain, range): Scale<number, TRange>

Defined in: packages/core/src/scales/quantize.ts:15

Creates a quantize scale that divides a continuous numeric domain into uniform segments mapped to discrete range values.

Type Parameters ​

Type Parameter
TRange

Parameters ​

ParameterType
domainnumber[]
rangeTRange[]

Returns ​

Scale<number, TRange>