chartjs / chartjs/Chart.js

(During) a chart animation it prevent from loading a new chart using update('none')

Open
#10,481 4 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

When I update a chart that is doing some animation, using update("none"), it should instantly stop the animation it is doing, and switch to the other chart.

Instead it just keep animating the preceding chart and discard the new data

### Current behavior

If I animate a chart, and then directly update('none') to a second chart, it won't load the second chart unless you wait until the first chart animation is done

### Reproducible sample

https://codepen.io/nicolas-keroack/pen/gOegxyK

### Optional extra steps/info to reproduce

_No response_

### Possible solution

Love to the chart.js devs, wish I will be to your programming level one day. For now I will keep learning but I can't provide to the project yet even if i'd love to :p

### Context

I have a page system, and need to reload the chart directly sometimes and sometimes with the animations

### chart.js version

3.8.0

### Browser name and version

Chrome 103.0.5060.114

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.