diff --git a/packages/@ourworldindata/grapher/src/dataTable/DataTable.tsx b/packages/@ourworldindata/grapher/src/dataTable/DataTable.tsx index 7a94a2c2167..f79a41ca9bf 100644 --- a/packages/@ourworldindata/grapher/src/dataTable/DataTable.tsx +++ b/packages/@ourworldindata/grapher/src/dataTable/DataTable.tsx @@ -675,7 +675,6 @@ export class DataTable extends React.Component<{ : TargetTimeMode.range const prelimValuesByEntity = this.preliminaryDimensionValues( - targetTimeMode, sourceColumn, targetTimes ) @@ -728,27 +727,14 @@ export class DataTable extends React.Component<{ } private preliminaryDimensionValues( - targetTimeMode: TargetTimeMode, sourceColumn: CoreColumn, targetTimes: number[] ): Map { - return targetTimeMode === TargetTimeMode.range - ? // In the "range" mode, we receive all data values within the range. But we - - // only want to plot the start & end values in the table. - // getStartEndValues() extracts these two values. - es6mapValues( - valuesByEntityWithinTimes( - sourceColumn.valueByEntityNameAndOriginalTime, - targetTimes - ), - getStartEndValues - ) - : valuesByEntityAtTimes( - sourceColumn.valueByEntityNameAndOriginalTime, - targetTimes, - sourceColumn.tolerance - ) + return valuesByEntityAtTimes( + sourceColumn.valueByEntityNameAndOriginalTime, + targetTimes, + sourceColumn.tolerance + ) } private dataValuesFromPreliminaryValues(