From dae2d2862ee1d5ffba94f0f14ff4b3addb9a34af Mon Sep 17 00:00:00 2001 From: Sophia Mersmann Date: Wed, 22 Jan 2025 16:34:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20allow=20single-entity=20selectio?= =?UTF-8?q?n=20for=20charts=20split=20by=20metric?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@ourworldindata/grapher/src/core/Grapher.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.tsx b/packages/@ourworldindata/grapher/src/core/Grapher.tsx index ed5a9b2c2b..1668301f9e 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -3692,16 +3692,11 @@ export class Grapher if (this.addCountryMode === EntitySelectionMode.MultipleEntities) return true + // if the chart is currently faceted by entity, then use multi-entity + // selection, even if the author specified single-entity-selection if ( - // we force multi-entity selection mode when the chart is faceted this.addCountryMode === EntitySelectionMode.SingleEntity && - this.facetStrategy !== FacetStrategy.none && - // unless the author explicitly configured the chart to be split - // by metric and hid the facet control - !( - this.facetStrategy === FacetStrategy.metric && - this.hideFacetControl - ) + this.facetStrategy === FacetStrategy.entity ) return true