Chartjs-Is there a way to trigger point hit on an xAxis hover

0👍

You need to specify intersect as false under your chart’s options hover configuration which by default is set to true.

var options = {
  hover: {
    intersect: false
  }
};

From the official docs:

If true, the hover mode only applies when the mouse position intersects an item on the chart.

Setting it to false means the hover will trigger when the user hovers on any part of the chart based on the xAxis.

Leave a comment