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

Grapher: Can't link to charts with an empty selection #4467

Closed
sophiamersmann opened this issue Jan 20, 2025 · 1 comment
Closed

Grapher: Can't link to charts with an empty selection #4467

sophiamersmann opened this issue Jan 20, 2025 · 1 comment

Comments

@sophiamersmann
Copy link
Member

Description

Linking to a chart with a default selection (like https://ourworldindata.org/grapher/life-expectancy?country=) doesn't work anymore. It shows the default selection instead.

Expected behaviour

Linking to a chart with an empty selection should work

Steps to reproduce

  1. Go to https://ourworldindata.org/grapher/life-expectancy
  2. Remove all countries from the selection
  3. Refresh

Additional context

Marcel looked at the code and the problem seems to be here:

if (this.manager?.selection?.hasSelection) {
// Selection is managed externally, do nothing.
} else if (this.selection.hasSelection) {
// User has changed the selection, use theris
} else this.applyOriginalSelectionAsAuthored()

@marcelgerber
Copy link
Member

Won't fix this one for now, we might come back to this if it bothers me or sophia :)

@marcelgerber marcelgerber closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants