Skip to content

Commit

Permalink
✨ capitalize 'time' when used as axis label
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Dec 18, 2024
1 parent cf5e224 commit c2f609e
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 c2f609e

Please sign in to comment.