apertureless / vue-chartjs

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

[Bug]: Incorrect animation on data change on two or more datasets in doughnut chart #1062

Open Toverbal opened 12 months ago

Toverbal commented 12 months ago

Would you like to work on a fix?

Current and expected behavior

When implementing a doughnut chart with two or more datasets, changing the dataset data will animate the first dataset correctly, but completely redraw the second and further.

I made a reproduction sample on stackblitz, it randomizes the data of the two datasets every 3 seconds. When the data is updated, the inner dataset will be fully redrawn, while the outer one is updated correctly.

My hunch is that it is a vue-chartjs issue, since it seems to be working with chartjs, see https://www.chartjs.org/docs/latest/samples/other-charts/doughnut.html (click 'Add dataset' and then 'Randomize').

Reproduction

https://stackblitz.com/edit/github-dkpthv-jjntw2?file=src%2FchartConfig.ts

chart.js version

v4.4.0

vue-chartjs version

v5.2.0

Possible solution

No response