diff --git a/web/frontend/src/components/StatsPie.vue b/web/frontend/src/components/StatsPie.vue index 5d223c6..ba1357a 100644 --- a/web/frontend/src/components/StatsPie.vue +++ b/web/frontend/src/components/StatsPie.vue @@ -1,8 +1,8 @@ @@ -38,8 +38,8 @@ export default class StatsPie extends Vue { return `stats-container-${this.statType}`; } - chartClass(): string { - return `chart-container-${this.statType}`; + chartID(): string { + return `chart-${this.statType}`; } mounted(): void { @@ -51,9 +51,7 @@ export default class StatsPie extends Vue { } renderPie(): void { - const elem = document.getElementById( - this.chartClass(), - ) as HTMLCanvasElement; + const elem = document.getElementById(this.chartID()) as HTMLCanvasElement; const ctx = elem.getContext('2d') as CanvasRenderingContext2D; const sortedStats = this.stats.sort(); const values = sortedStats.map((s) => s.count);