Chartjs-How to show tooltip only when data available in chart js?

0👍

I have been faced same problem several days ago. I checked documentation and github both but i couldn’t find the solution for disabling tooltip when data is not available.

Then i found a solution.

Then i checkced data on runtime and set a variable. When i draw chart then i check variable which i have been set on runtime and disable the tooltip accordingly.

tooltips: {
      enabled: false

}

You can use above piece of code for disabling tooltip while drawing chart on canvas.

Leave a comment