How does Chart.js creates BezierCurves with Tension? #10321
-
I am trying to understand the bezierCurve but struggle to find the formula or how Chart.js uses the bezierCurveTo. Could anyone perhaps point me in the right direction? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Looking at the code it seems the bezier curved get drawn here: Chart.js/src/helpers/helpers.canvas.js Lines 295 to 306 in c057c96 The points for the curve get updated here: Chart.js/src/helpers/helpers.curve.js Lines 185 to 211 in 0ba5c70 Tension gets used here to calculate the points ( Chart.js/src/helpers/helpers.curve.js Lines 8 to 40 in 0ba5c70 |
Beta Was this translation helpful? Give feedback.
Looking at the code it seems the bezier curved get drawn here:
Chart.js/src/helpers/helpers.canvas.js
Lines 295 to 306 in c057c96
The points for the curve get updated here:
Chart.js/src/helpers/helpers.curve.js
Lines 185 to 211 in 0ba5c70