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

fix: Interactive color legend #1059

Merged
merged 2 commits into from
Jun 6, 2023
Merged

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Jun 6, 2023

Fixes #1058.

This PR fixes two problems with interactive color legend issues.

  1. Stacked bar chart was using all segments defined in the data to construct series (coordinates to draw the chart) – when one segment was de-selected using interactive color legend, it would introduce NaNs and thus break the chart. Now we use plottable segments to create series.
  2. Interactive color legend not affecting the chart – as we store abbreviations / labels inside interactive filters state, we need to also get segment abbreviation / label when applying interactive filters to the data (previously we would try to access segment value).

How to test

Re-create the charts specified in #1058 to see that they now work correctly.

@bprusinowski bprusinowski requested a review from ptbrowne as a code owner June 6, 2023 11:05
@vercel
Copy link

vercel bot commented Jun 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview Jun 6, 2023 11:05am

Copy link
Collaborator

@ptbrowne ptbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have only a tiny suggestion, thanks !

@bprusinowski
Copy link
Collaborator Author

Thanks for reviewing @ptbrowne!

@bprusinowski bprusinowski merged commit 77e309f into main Jun 6, 2023
@bprusinowski bprusinowski deleted the fix/interactive-color-legend branch June 6, 2023 11:30
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

Successfully merging this pull request may close these issues.

Interactive Filter Error
2 participants