Chartjs-Can you add an action to an element within the tooltip in chart.js?

0👍

No this is not possible with the default provided tooltip, first it won’t stay so when you try to hover the tooltip it’s not there anymore
Second reason it won’t work is because chart.js does not have any event listeners that listen to clicks/hovers over specific parts of the tooltip or the tooltip in general.

So you will need to make a custom external html tooltip that stays even while you don’t hover datapoint anymore where you can add a normal button

Leave a comment