chartjs / chartjs-plugin-annotation

Annotation plugin for Chart.js
MIT License
606 stars 328 forks source link

Enable the line curve in the line annotation #754

Closed stockiNail closed 1 year ago

stockiNail commented 2 years ago

This PR is enabling the line curve representation by the line annotation.

curvesample

Option Type Default Description
curve boolean false if true, the line will be drawn as a curve
controlPoint string - number- {x: string - number, y: string - number} {y:'-50%'} Distance (in px or percentage of the distance between the start and end point) from the center

It uses quadratic curve and Path2D.

TODO

kurkle commented 1 year ago

@stockiNail I'm not merging these, so you can decide the order you want to go.