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

[Bug]: Selecting the legend on a StackedBarChart doesn't work if data is loaded in after the initial load #1859

Open
1 of 6 tasks
molyholy opened this issue Jun 18, 2024 · 0 comments

Comments

@molyholy
Copy link

Relevant package(s)

  • @carbon/charts
  • @carbon/charts-svelte
  • @carbon/charts-react
  • @carbon/charts-angular
  • @carbon/charts-vue
  • Documentation website

Carbon Charts Version

1.16.4

Which bundler are you using?

Webpack

What happened and what did you expect to happen?

See this stackblitz for reproduction. It simulates the conditions in our project, where we are calling API calls one after another to gradually update a StackedBarChart.

In the stackblitz, Dataset1 and Dataset2 are loaded in immediately. There is a setTimeout function to load in Dataset3 after 3 seconds. Once Dataset3 gets loaded in, notice how you can select the legend boxes for Dataset1 and Dataset2 to filter the graph, but selecting Dataset3's legend box doesn't work. It seems like any data loaded in after the initial load cannot be filtered by selecting the legend box.

Chart data and options (automatically formatted so no need for backticks)

No response

JavaScript console or build output (if relevant)

No response

StackBlitz repro

https://stackblitz.com/edit/react-3p1l1r-oixhm8?file=src%2Findex.js

IBM Application/Team (if relevant)

Cloud UI

What priority level would this be in your opinion?

P2 (Medium)

@molyholy molyholy changed the title [Bug]: Selecting the legend on a StackedBarChart doesn't work if data is loaded in after the initial render [Bug]: Selecting the legend on a StackedBarChart doesn't work if data is loaded in after the initial load Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant