Skip to content
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

StackedAreaChart - Adding series causes chart to crash #1642

Open
JoTrdl opened this issue Mar 19, 2024 · 0 comments
Open

StackedAreaChart - Adding series causes chart to crash #1642

JoTrdl opened this issue Mar 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JoTrdl
Copy link

JoTrdl commented Mar 19, 2024

Bug summary

Adding new series to the data prop in the StackedAreaChart breaks it (but removing some series is OK).

Expected behavior

The chart should not break.

Actual behavior

polaris-stackedArea-crash.mp4

Steps to reproduce the problem

Here the codesandbox link: https://codesandbox.io/p/sandbox/modern-thunder-9fqny3

Solution

The exception happens at the test condition here
Adding this check solves the issue:

const dataIsValidForAnimation =
           !previousStackedValues ||
+          !previousStackedValues[index] ||
          data.length === previousStackedValues[index].length;
@JoTrdl JoTrdl added the bug Something isn't working label Mar 19, 2024
hrstrand added a commit to hrstrand/polaris-viz that referenced this issue Oct 12, 2024
fixed issue mentioed in Shopify#1642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant