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

Explorers: Indicators are shown more than once in the same chart #3943

Closed
lucasrodes opened this issue Sep 9, 2024 · 2 comments · Fixed by #3957
Closed

Explorers: Indicators are shown more than once in the same chart #3943

lucasrodes opened this issue Sep 9, 2024 · 2 comments · Fixed by #3957
Assignees

Comments

@lucasrodes
Copy link
Member

Description

For some explorer views, the same indicator (its time-series, legend name, etc) is shown more than once. I think this may only be happening for catalogPath-based explorers.

Expected

Indicators should be shown only once.

Context and Examples

Issue first raised by Bastian (https://github.com/owid/owid-issues/issues/1650#issuecomment-2338126422), then reported on Slack.

Conflict explorer

View
image

I also realised that if I switch between views (and keep doing it), the indicators are added again, and again, ...

image

Population & demography explorer

View
image

Migration explorer

View
image

Steps to reproduce

  1. Go to https://ourworldindata.org/explorers/migration
  2. Switch to 'Chart' view. You'll see indicators repeated for each country.

Optional:

  1. Then select another option from the drop-down menu, e.g. 'International immigrants'
  2. Then select back the initial drop-down option 'International emigrants'. You'll see indicators added a third time for each country.

Environment

For desktop, provide:

  • OS: Linux (Arch Manjaro)
  • Browser: Firefox
  • Version: 125.0.1-1
@danyx23
Copy link
Contributor

danyx23 commented Sep 9, 2024

In this slack conversation, Ike found this source of the bug:

In Explorer.tsx, the partialGrapherConfig for 812749 has 812749 twice in its dimensions. (edited)
The duplicate is getting pushed in here:

yVariableIdsList.forEach((yVariableId) => {

So one fix would be to not push duplicates from yVariableIdsList into dimensions,

@lucasrodes
Copy link
Member Author

lucasrodes commented Sep 13, 2024

@larsyencken should we consider this fixed?

cc. @ikesau

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants