You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The show() animates the arc being shown as well as the ones being resized, while the hide() makes the arc being hidden disappear instantly while the rest of the bars resize. The hide() should animate the disappearing arc in the same way as the ones being resized to fill in the space.
I came across your previous work on the functionality implemented in #9450. Upon reviewing the code, I noticed a conditional statement that checks whether a dataset element is hidden:
If it is, the loop continues, bypassing the draw function. This approach leads to the immediate removal of the arc element instead of animating it, resulting in a jagged animation.
I experimented with removing the mentioned check, and I observed that the element removal still occurs correctly, with the expected animation. However, I want to acknowledge that I haven't had the opportunity to thoroughly examine the code. I apologize if my inquiry appears trivial or if I've overlooked any important details.
Expected behavior
The Doughnut chart should animate the
hide()
the same way as theshow()
.https://www.chartjs.org/docs/latest/samples/other-charts/doughnut.html
Current behavior
The
show()
animates the arc being shown as well as the ones being resized, while thehide()
makes the arc being hidden disappear instantly while the rest of the bars resize. Thehide()
should animate the disappearing arc in the same way as the ones being resized to fill in the space.Reproducible sample
https://www.chartjs.org/docs/latest/samples/other-charts/doughnut.html
Optional extra steps/info to reproduce
Click on show(0,1) and then hide(0,1).
Possible solution
No response
Context
No response
chart.js version
v4.3.0
Browser name and version
Chrome Version 114.0.5735.133 (Official Build) (arm64)
Link to your project
No response
The text was updated successfully, but these errors were encountered: