chartjs / chartjs-plugin-annotation

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

Improve event handling on point annotation adding test cases #615

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

This PR is adding a specific test case in order to test inRange method when radius of the point annotation is 0.

Furthermore, it changes the invocation on isPointRange, passing radius and borderWidth separately. There was a case where the radius could be set to 0 and borderWidth to another figure and the isPointRange could return true (instead of false).

stockiNail commented 2 years ago

Closed din favor to a common update to all annotations to take care of border thickness.