chartjs / chartjs-plugin-annotation

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

Enable label `position` as percentage of the size #553

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

Sometimes the start, center and end position could be the best options to position a label.

Maybe you would like to put it a specific position of the line.

To address the above cases, you could implement to set the position as percentage of the size.

position : 'start' | 'center' | 'end' | number | string

The number could be a value between 0 and 1 or a string with % (i.e. '25%') which represents the percentage of the size.