Documentation / @ripl/core / scalePoint
Function: scalePoint()
scalePoint<
TDomain>(domain,range,options?):PointScale<TDomain>
Defined in: packages/core/src/scales/point.ts:32
Creates a point scale that maps discrete domain values to evenly spaced positions across the range (the categorical analogue of a continuous axis — points, not bands). With zero padding the first and last values sit exactly on the range endpoints. inverse returns the nearest domain value.
Type Parameters
| Type Parameter | Default type |
|---|---|
TDomain | string |
Parameters
| Parameter | Type |
|---|---|
domain | TDomain[] |
range | number[] |
options? | PointScaleOptions |
Returns
PointScale<TDomain>