chartjs / chartjs-plugin-annotation

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

"hover" options are missing #805

Open stockiNail opened 1 year ago

stockiNail commented 1 year ago

The current annotations options are including a set of options which can be changed when the element is hovered.

For instance, backgroundColor or font.

These new options could be added in order to avoid to the user to implement an event handler to do that.

It seems currently disabled in CHART.JS for subresolver. (see https://github.com/kurkle/chartjs-chart-treemap/issues/149#issuecomment-1281203292)

stockiNail commented 1 year ago

The active property of the element is not changing to true when an annotation element is hovered. This is because CHART.JS is managing it for "data" element of a controller and not to other elements, like the element created by the plugin.

Therefore this should be managed internally by the plugin itself but it could be an useless overhead just for hovering.