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

feat: implement MissingDataStrategy for StackedDiscreteBar chart #3821

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

marcelgerber
Copy link
Member

@marcelgerber marcelgerber commented Jul 29, 2024

Slack discussion

Currently having it as auto (default) will hide missing data.
I'll check with the SVG tester if that seems like a good default.

Before / After

With `MissingDataStrategy.auto` With `MissingDataStrategy.hide`

image

image

@owidbot
Copy link
Contributor

owidbot commented Jul 29, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-stacked-discrete-bar-missing-data

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 (40623d) ✅

Edited: 2024-08-15 15:48:21 UTC
Execution time: 1.24 seconds

Copy link

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@github-actions github-actions bot added the stale label Aug 13, 2024
@marcelgerber
Copy link
Member Author

Looking at the SVG diff (owid/owid-grapher-svgs@e1e16d3), almost all of these cases benefit from missing data being shown. Therefore, I will make it so that auto and show both do the same thing (show entities with missing data), and only hide hides them.

@marcelgerber marcelgerber force-pushed the stacked-discrete-bar-missing-data branch 2 times, most recently from e2ef106 to 609455c Compare August 15, 2024 12:02
@marcelgerber marcelgerber force-pushed the stacked-discrete-bar-missing-data branch from 609455c to 0d16ece Compare August 15, 2024 14:35
@marcelgerber
Copy link
Member Author

Okay, I now tried another attempt (see owid/owid-grapher-svgs@bb88642) where with MissingDataStrategy.auto, we would remove all entities where only a single data point is available.

I thought that makes sense, but now realize in the SVG diff that this doesn't really improve any of these charts. Will revert this change, then.

@marcelgerber marcelgerber marked this pull request as ready for review August 15, 2024 15:51
@github-actions github-actions bot removed the stale label Aug 16, 2024
Copy link
Member

@sophiamersmann sophiamersmann left a comment

Choose a reason for hiding this comment

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

Nice! Makes sense to me!

@marcelgerber marcelgerber merged commit 9013bf3 into master Aug 19, 2024
23 checks passed
@marcelgerber marcelgerber deleted the stacked-discrete-bar-missing-data branch August 19, 2024 10:51
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.

3 participants