Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Setting Y-Min for bar chart messes with interactions/tooltips

Open Travja opened this issue 10 months ago • 2 comments

Expected behavior

When setting the interaction axis to 'x', intersect false, mode 'nearest' and then setting the y scale min value to 1, I would expect that hovering above the bars on the chart would show a tooltip on each of the bars.

Current behavior

Hovering over the individual bars does nothing. It's not until your cursor actually intersects the bars that the tooltip appears. If I change the y-min to 0.5, it appears to work normally. Setting it to 0.8 doesn't catch the shorter bars in the example, but does appear to work more like one would expect.

Reproducible sample

https://codepen.io/Travja/pen/eYoVjNg

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.4.2

Browser name and version

Chrome 123.0.6312.105

Link to your project

No response

Travja avatar Apr 05 '24 15:04 Travja