Fix: applyStack() returned the sum of all values for hidden dataset indices
… which causes incorrect animations when showing/hiding stacked datasets. This fixes #11198.
Is it possible to write a test for this change?
That is exactly the fix I'm desperate for. Would be great, if this got merged.
@etimberg I could've looked into writing the test, but I'm new to the library codebase, so I would really appreciate, if you can help me to find the correct place to write this test. I found tests for datasets visibility in the core.controller.tests.js, but I didn't find lots of examples of how and where to write tests of animated transitions. Is there now a standart way to test transitions and to check which values library are using during the transition?
@DeyLak I don't believe we have a standard way to check for values during animations.
I would probably write a test that verifies that the sum doesn't include hidden datasets and that should be enough.
I've submitted the new PR: https://github.com/chartjs/Chart.js/pull/11938
Closing since this was fixed in #11938