How can I show tooltips always using Chart.js version 2 (alpha)?
I have tried this Chart.js - Doughnut show tooltips always?, but seems that this have changed in this last version.
How can I show tooltips always using Chart.js version 2 (alpha)?
I have tried this Chart.js - Doughnut show tooltips always?, but seems that this have changed in this last version.
This worked for me:
You need to loop through the datasets and point and create tooltips in
onAnimationComplete
(setting the events array to an empty array won't work).Just like before you have to remove the events from the events array so that the tooltips don't disappear once you mouseover and mouseout, but in this case you need to set
events
tofalse
.Also, I think the version in dev when I last checked had a problem with onAnimationComplete not triggering unless the
animation
duration
was0
.Here is the relevant code
Fiddle - https://jsfiddle.net/c8Lk2381/