Skip to content

🔨 (etl) replace hideLegend with hideSeriesLabels#5719

Merged
sophiamersmann merged 1 commit intomasterfrom
refactor-hide-legend
Mar 4, 2026
Merged

🔨 (etl) replace hideLegend with hideSeriesLabels#5719
sophiamersmann merged 1 commit intomasterfrom
refactor-hide-legend

Conversation

@sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Feb 26, 2026

Important

Wait for PRs in owid-grapher to land before merging

Renames the chart config's hideLegend to hideSeriesLabels. Because this is a breaking change, the config schema version is bumped from 009 to 010.

For line charts, slope charts and stacked area charts, hideLegend is renamed to hideSeriesLabels. For all other chart types, hideLegend is dropped.

As far as I can see, all charts here that currently use the hideLegend are line charts, so I renamed them to hideSeriesLabels

The ETL unit tests are failing because there's no config schema yet at https://files.ourworldindata.org/schemas/grapher-schema.010.json. I guess, I'll wait for the owid-grapher PR to land, then run the test suite again?

I don't understand some of the differences reported by data-diff - seem to be unrelated.

@owidbot
Copy link
Contributor

owidbot commented Feb 26, 2026

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-refactor-hide-legend

chart-diff: ✅ No charts for review.
data-diff: ❌ Found differences
= Dataset garden/growth/2024-05-16/gdp_historical
  = Table gdp_historical
    ~ Column gdp (changed metadata)
-       -     hideLegend: true
+       +     hideSeriesLabels: true
    ~ Column gdp_per_capita (changed metadata)
-       -     hideLegend: true
+       +     hideSeriesLabels: true
= Dataset garden/worldbank_wdi/2026-01-29/wdi
  = Table wdi
    ~ Column ne_trd_gnfs_zs (changed metadata)
-       - presentation:
-       -   topic_tags:
-       -     - Trade & Globalization
    ~ Column sl_emp_totl_sp_fe_ne_zs (changed metadata)
-       -     This indicator is defined as the proportion of a country’s working-age population that is employed. It is also known as the employment-to-population ratio. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
+       +     This indicator is defined as the proportion of a country’s working-age population that is employed. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
-       -   name: Female employment rate
+       +   name: Female employment-to-population ratio
-       -     title: Female employment rate
+       +     title: Female employment-to-population ratio
    ~ Column sl_emp_totl_sp_fe_zs (changed metadata)
-       -     This indicator is defined as the proportion of a country’s working-age population that is employed. It is also known as the employment-to-population ratio. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
+       +     This indicator is defined as the proportion of a country’s working-age population that is employed. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
-       -   name: Female employment rate
+       +   name: Female employment-to-population ratio
-       -     title: Female employment rate
+       +     title: Female employment-to-population ratio
    ~ Column sl_emp_totl_sp_ma_zs (changed metadata)
-       -     This indicator is defined as the proportion of a country’s working-age population that is employed. It is also known as the employment-to-population ratio. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
+       +     This indicator is defined as the proportion of a country’s working-age population that is employed. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
-       -   name: Male employment rate
+       +   name: Male employment-to-population ratio
-       -     title: Male employment rate
+       +     title: Male employment-to-population ratio
    ~ Column sl_emp_totl_sp_ne_zs (changed metadata)
-       -     This indicator is defined as the proportion of a country’s working-age population that is employed. It is also known as the employment-to-population ratio. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
+       +     This indicator is defined as the proportion of a country’s working-age population that is employed. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
-       -   name: Employment rate
+       +   name: Employment-to-population ratio
-       -     title: Employment rate
+       +     title: Employment-to-population ratio
    ~ Column sl_emp_totl_sp_zs (changed metadata)
-       -     This indicator is defined as the proportion of a country’s working-age population that is employed. It is also known as the employment-to-population ratio. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
+       +     This indicator is defined as the proportion of a country’s working-age population that is employed. Employment refers to people who worked for at least an hour during the reference period (typically a week), whether in paid employment or self-employment. This indicator gives a broad sense of how many people in a country are working, regardless of the kind of job they have or how many hours they work.
-       -   name: Employment rate
+       +   name: Employment-to-population ratio
-       -     title: Employment rate
+       +     title: Employment-to-population ratio


Legend: +New  ~Modified  -Removed  =Identical  Details
Hint: Run this locally with etl diff REMOTE data/ --include yourdataset --verbose --snippet

Automatically updated datasets matching excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included

Edited: 2026-02-26 10:10:24 UTC
Execution time: 30.26 seconds

Comment on lines -293 to -295
"hideLegend": {
"$ref": "https://files.ourworldindata.org/schemas/grapher-schema.009.json#/properties/hideLegend"
},
Copy link
Member Author

Choose a reason for hiding this comment

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

Dropped without replacement because explorers never supported the hideLegend field (and I also didn't add support for the new hideSeriesLabels field).

@sophiamersmann sophiamersmann marked this pull request as draft February 26, 2026 10:48
Copy link
Collaborator

@Marigold Marigold left a comment

Choose a reason for hiding this comment

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

It should be good based on docs I've created from the past version bump.

@sophiamersmann sophiamersmann changed the title 🔨 replace hideLegend with hideSeriesLabels 🔨 (etl) replace hideLegend with hideSeriesLabels Feb 26, 2026
@sophiamersmann sophiamersmann marked this pull request as ready for review March 4, 2026 09:21
@sophiamersmann sophiamersmann merged commit 59978d1 into master Mar 4, 2026
3 of 5 checks passed
@sophiamersmann sophiamersmann deleted the refactor-hide-legend branch March 4, 2026 09:22
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