Chart.js: How to trigger the tooltip everywhere without worrying about the points?

Created on 8 Aug 2019  路  1Comment  路  Source: chartjs/Chart.js

I want to trigger the tooltip everywhere in the chart area without worrying about the points. How could I do that?

Expected:
DepthChart

Current:
If I move my mouse to near the data point it will trigger the tooltip and show. otherwise, it will hide. This behavior will make the tooltip not continuously, it makes the tooltip disappear for a certain time.

Most helpful comment

See intersect in documentation

I guess you want:

tooltips: {
  mode: 'nearest',
  axis: 'x',
  intersect: false
}

>All comments

See intersect in documentation

I guess you want:

tooltips: {
  mode: 'nearest',
  axis: 'x',
  intersect: false
}
Was this page helpful?
0 / 5 - 0 ratings