Skip to content

Commit

Permalink
🐛 (stacked bar/area) show timeline on table tab
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Apr 8, 2024
1 parent 4d398a7 commit ede3f24
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/@ourworldindata/grapher/src/core/Grapher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1427,11 +1427,16 @@ 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
if (this.isStackedBar || this.isStackedArea) return true
return !this.hideTimeline

default:
return false
}
Expand Down

0 comments on commit ede3f24

Please sign in to comment.