Skip to content

Commit

Permalink
✨ capitalize 'time' when used as axis label (#4333)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann authored Dec 20, 2024
1 parent 6205b1b commit 3fe21f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@ourworldindata/core-table/src/CoreTableColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
IndicatorTitleWithFragments,
max,
min,
capitalize,
} from "@ourworldindata/utils"
import { CoreTable } from "./CoreTable.js"
import {
Expand Down Expand Up @@ -837,6 +838,10 @@ export abstract class TimeColumn extends AbstractCoreColumn<number> {

abstract preposition: string

@imemo get displayName(): string {
return capitalize(this.name)
}

formatTime(time: number): string {
return this.formatValue(time)
}
Expand Down

0 comments on commit 3fe21f5

Please sign in to comment.