From 9fbb01aa6a64e728632710644260b701ce076b67 Mon Sep 17 00:00:00 2001 From: sophiamersmann Date: Mon, 8 Apr 2024 10:52:15 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20(stacked=20bar/area)=20show=20ti?= =?UTF-8?q?meline=20on=20table=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@ourworldindata/grapher/src/core/Grapher.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.tsx b/packages/@ourworldindata/grapher/src/core/Grapher.tsx index a139eacf68f..6b6025cf0fa 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -1427,11 +1427,17 @@ export class Grapher case GrapherTabOption.map: return !this.map.hideTimeline - // use the chart-level `hideTimeline` option for the table, too - case GrapherTabOption.table: + // use the chart-level `hideTimeline` option case GrapherTabOption.chart: return !this.hideTimeline + // use the chart-level `hideTimeline` option for the table, with some exceptions + case GrapherTabOption.table: + // always show the timeline for stacked bar/area charts and line charts + if (this.isStackedBar || this.isStackedArea || this.isLineChart) + return true + return !this.hideTimeline + default: return false }