有没有办法在 xAxis 悬停时触发点命中

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

我正在尝试让数据点悬停在用户悬停在基于 xAxis 的图表的任何部分上时触发。

我不希望他们必须直接悬停在数据点上。

我尝试设置 pointHitRadius,但当然这是一个半径,因此数据点的碰撞框开始重叠。

您需要在图表选项 hover 配置下将 intersect 指定为 false,默认设置为 true

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

来自official docs:

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

设置为false意味着当用户悬停在基于xAxis的图表的任何部分时将触发悬停。