diff --git a/packages/@ourworldindata/core-table/src/OwidTable.ts b/packages/@ourworldindata/core-table/src/OwidTable.ts index 763bc49907b..7e702ac39a1 100644 --- a/packages/@ourworldindata/core-table/src/OwidTable.ts +++ b/packages/@ourworldindata/core-table/src/OwidTable.ts @@ -186,7 +186,7 @@ export class OwidTable extends CoreTable { } // Does a stable sort by time. You can refer to this table for fast time filtering. - @imemo private get sortedByTime(): this { + @imemo get sortedByTime(): this { if (this.timeColumn.isMissing) return this return this.sortBy([this.timeColumn.slug]) } diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.tsx b/packages/@ourworldindata/grapher/src/core/Grapher.tsx index ed0b5d920ee..7855f151cbf 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -811,7 +811,7 @@ export class Grapher if (this.isSlopeChart) return table.filterByTargetTimes([startTime, endTime]) - return table.filterByTimeRange(startTime, endTime) + return table.filterByTimeRange(startTime, endTime).sortedByTime } @computed get transformedTable(): OwidTable {