Function
monotoneX
function monotoneX(flat: number[], step?: number): number[];
Monotone cubic interpolation in x (Steffen’s method, same family as d3’s monotoneX).
Never overshoots the data: peaks stay at the data points, flat runs stay flat.
step is the target spacing of the output samples in local units.
Parameters#
| Parameter | Type | Default value |
|---|---|---|
flat | number[] | undefined |
step | number | 2 |
Returns#
number[]