diff --git a/src/components/cap-map.js b/src/components/cap-map.js index 52f2dcc..1b7f1fe 100644 --- a/src/components/cap-map.js +++ b/src/components/cap-map.js @@ -150,6 +150,10 @@ export class CapMap extends LitElement { return mapping; } + getFormattedNumber(number) { + return number.toLocaleString(); + } + render() { return html`
- ${this.activeStats.caseCount}
Unique cases
- ${this.activeStats.reporterCount}
Reporters
+ ${this.getFormattedNumber(
+ this.activeStats.reporterCount,
+ )}
Reporters
- ${this.activeStats.pageCount}
Pages scanned
@@ -186,22 +189,19 @@ export class CapMap extends LitElement {
- ${nationalCaselawStats.total.caseCount}
Unique cases
+ ${this.getFormattedNumber(
+ nationalCaselawStats.total.caseCount,
+ )}
Unique cases
- ${nationalCaselawStats.total.reporterCount}
Reporters
+ ${this.getFormattedNumber(
+ nationalCaselawStats.total.reporterCount,
+ )}
Reporters
- ${nationalCaselawStats.total.pageCount}
Pages scanned
+ ${this.getFormattedNumber(
+ nationalCaselawStats.total.pageCount,
+ )}
Pages scanned