monotonePath
Chart
stable
Generates a smooth SVG cubic-Bezier path through pixel coordinates using the Fritsch-Carlson monotone spline algorithm. Produces no overshoot at sharp peaks. Falls back to linePath for fewer than 3 points.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- pointsrequisArray<TPathPoint>
- Array of pre-scaled SVG pixel coordinate pairs [x, y]. A minimum of 3 points is required for the spline; smaller arrays fall back to linePath.
API
Valeur de retour
La valeur retournée par cet util.
- SVG path d attribute string with cubic Bezier commands (C). Falls back to the M…L… output of linePath when fewer than 3 points are supplied.
Usage
Exemples
Extraits de code prêts à coller.
Smooth spline through data points