Chartjs-Displaying ChartJS tooltip on mouseover of bar/line

4👍

In your implementation, remove that piece of code.

  tooltips: {
    mode: 'point',
  },
  hover: {
    mode: 'point',
  },

and then add the mode in the tooltips a few lines down:

tooltips: {
  mode: 'point',
  callbacks: {}
}

Since the points down sit in the range of the bar chart, they aren’t technically intersecting.

But if you do create a point within the range, it’ll be able to pick it up on the tooltip.

Leave a comment