Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chartjs tooltips disappear when calling Chart.update

Tags:

chart.js

I have the goal of showing a tooltip on a near real-time chart that is updating constantly.

Using the standard tooltips in the chartjs library, calling Chart.update() will destroy the tooltip.

In the example here, if the user is hovering the chart, and the graph is updated, the tooltip goes away.

Note: if I change the chartjs version to 2.5.0, there is no issue. It appears to be a bug in 2.7.2

How do I prevent this behavior?

like image 521
activedecay Avatar asked Aug 08 '26 02:08

activedecay


1 Answers

Right now there seems to be no official solution. There is still a discussion ongoing on how to fix this: Do not hide tooltip when update is called

like image 88
Metin Celik Avatar answered Aug 11 '26 03:08

Metin Celik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!