![]() |
VOOZH | about |
The d3.curveMonotoneY interpolator assumes that the data is sorted according to the y coordinates otherwise it sorts the data accordingly. This curve method produces a cubic spline that preserves monotonicity in x, assuming monotonicity in y.
Syntax:
d3.curveMonotoneY()
Parameters: This method does not accept any parameters.
Return Value: This method does not return any value.
Example 1:
Output:
👁 ImageExample 2: Sorting the unsorted points by the x-axis then rendering the curve.