Skip to content

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

@Toverbal

Description

@Toverbal

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions