From 3fe21f58b55e26f3fc9834c994e7cb98ea537827 Mon Sep 17 00:00:00 2001 From: Sophia Mersmann Date: Fri, 20 Dec 2024 14:17:18 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20capitalize=20'time'=20when=20used?= =?UTF-8?q?=20as=20axis=20label=20(#4333)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@ourworldindata/core-table/src/CoreTableColumns.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@ourworldindata/core-table/src/CoreTableColumns.ts b/packages/@ourworldindata/core-table/src/CoreTableColumns.ts index 64b355d867e..8c08d7f2489 100644 --- a/packages/@ourworldindata/core-table/src/CoreTableColumns.ts +++ b/packages/@ourworldindata/core-table/src/CoreTableColumns.ts @@ -26,6 +26,7 @@ import { IndicatorTitleWithFragments, max, min, + capitalize, } from "@ourworldindata/utils" import { CoreTable } from "./CoreTable.js" import { @@ -837,6 +838,10 @@ export abstract class TimeColumn extends AbstractCoreColumn { abstract preposition: string + @imemo get displayName(): string { + return capitalize(this.name) + } + formatTime(time: number): string { return this.formatValue(time) }