apertureless / vue-chartjs

📊 Vue.js wrapper for Chart.js
https://vue-chartjs.org
MIT License
5.49k stars 831 forks source link

[Bug]: Tooltip references invalid element after chart data updates #1063

Closed mihai-peteu closed 6 months ago

mihai-peteu commented 7 months ago

Would you like to work on a fix?

Current and expected behavior

If the chart data changes in the background, while an existing tooltip is shown (triggered by a previous hover action), then the mouse is moved again - chart.js will trigger an inChartArea = false event, attempting to reuse the old/invalid active elements.

Issue: https://github.com/chartjs/Chart.js/issues/11315

Fix PR: https://github.com/chartjs/Chart.js/pull/11596

Reproduction

https://github.com/chartjs/Chart.js/pull/11596#issue-2013444481

chart.js version

v4.1.1

vue-chartjs version

v5.2.0

Possible solution

The bug fix is included in this chartjs release: https://github.com/chartjs/Chart.js/releases/tag/v4.4.1

Specifically, by this PR: https://github.com/chartjs/Chart.js/pull/11596

mihai-peteu commented 7 months ago

@apertureless - chart.js v4.4.1 should fix this issue.

PR to bump the version https://github.com/apertureless/vue-chartjs/pull/1064

apertureless commented 6 months ago

PR is merged and new version released. Should be fixed.