chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
64.75k stars 11.92k forks source link

'Bar' graph and indexAxis: 'y' and intersect: false = Bug #10312

Open Alexi74 opened 2 years ago

Alexi74 commented 2 years ago

Expected behavior

Сorrect tooltip location when using intersect: false and indexAxis: 'y'.

Current behavior

Incorrect tooltip location when using intersect: false and indexAxis: 'y'.

https://codepen.io/Alex744/pen/MWrxrQe

Reproducible sample

https://codepen.io/Alex744/pen/MWrxrQe

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

3.7.1

Browser name and version

No response

Link to your project

No response

Travja commented 7 months ago

Little bit of a necro.. but it looks like you just need to set the interaction axis to 'y'. See: https://codepen.io/Travja/pen/vYMdaKQ