-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stacked Bar Chart show/hide animations have wrong target values #11198
Comments
I think the relation between top and bottom is controlled by height, which could also be animated. Disclaimer: I did not check if height is the actual property, it could be something else too. |
@kurkle in a bar controller, the properties are @hemmoleg I have played a bit, maybe it's what you are looking for: https://codepen.io/stockinail/pen/dyqQGXP: |
@stockiNail thank you very much for your reply. while it wasnt exactly what i was looking for, it was enough to point me in the right direction. i had no idea what the syntax for these custom animtions would have to look like. but thanks to you now i know :) |
The real issue is that applyStack() returns the wrong value for a dataset index if that index ( |
Expected behavior
when showing/hiding parts of a stacked bar chart in conjunction with fixed y-coordinates for the show/hide animation both the upper and lower end of the part which is being shown/hidden should animate towards the set y-coordinate.
Current behavior
instead what happens is that the upper end moves towards the set y-coordiante, which is correct. however the lower end moves towards the upper end of the part which is above the part that is being hidden.
check out the reproduction sample and let me explain again using that sample as a reference: in the legend click on the item for "A". as you can see the A-part of all bars is being hidden. But the animation is wrong. So what hapens is that the upper end of the A-parts moves towards the set y-coordinate. however, as i said, the lower end of the A-part moves towards the upper end of the B-part which is on top of it. What should happen instead is that both the upper and the lower end of a part move towards the set y-coordinate.
Reproducible sample
https://codepen.io/hemmoleg-the-sans/pen/yLxQyEG
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
v4.2.1
Browser name and version
No response
Link to your project
No response
The text was updated successfully, but these errors were encountered: