You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The active context property for this plugin exists for almost two years (c9cab49) while hover in Chart.js exists for about one week so it doesn't really make sense to consider modifying this plugin since the impact on users would be too important (compared to modifying Chart.js). I also don't want to add both properties.
I chose active instead of hover(ed) because an element can be active while the mouse is not over the element (for example when hover.intersect: false, axis: 'y'). Maybe I don't understand correctly the term "hover" in that case so what does context.hover mean in English?!
Note that the Chart.js docs for onHover states: "Called in the context of the chart and passed the event and an array of active elements. So I would suggest to align Chart.js instead and rename the hover context property to active.
@simonbrunel Thank you very much for your explanation.
I fully agree with you.
I assumed (wrongly) that scriptable options in CHART.js was taken from Datalabels plugin because they are very similar. And I was surprised to see the differences on the context.
I'm gonna raise the topic to Chart.js asa I can.
In new Chart.Js version 2.9.x, there is a similar implementation of context.
In DataLabels there is:
In Chart.js there is:
hover:
true
if hoveredWhat do you think to be aligned with Chart.JS, renaming it in
hover
?The text was updated successfully, but these errors were encountered: