chartjs / chartjs-plugin-annotation

Annotation plugin for Chart.js
MIT License
603 stars 325 forks source link

Reduce complexity for resolving the label callout position #743

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

This reduces complexity using the enumerated callout position values to check if manageable instead of an if statement with for conditions in OR.

stockiNail commented 2 years ago

positions.includes

yes... as usual, forgive my poor knowledge on JS api...

stockiNail commented 2 years ago

positions.includes

yes... as usual, forgive my poor knowledge on JS api...

done