diff --git a/frontend/src/ts/pages/account.ts b/frontend/src/ts/pages/account.ts index d40b2aa0e..94a044574 100644 --- a/frontend/src/ts/pages/account.ts +++ b/frontend/src/ts/pages/account.ts @@ -739,17 +739,19 @@ function fillContent(): void { chartData.forEach((a) => { if (a.y > currentPb) { currentPb = a.y; - pb.push(a); + //todo: remove temporary fix + // pb.push(a); } }); // add last point to pb const xMax = chartData.length; - pb.push({ - x: xMax, - y: pb[pb.length - 1].y, - }); + //todo: remove temporary fix + // pb.push({ + // x: xMax, + // y: pb[pb.length - 1].y, + // }); const avgTen = []; const avgTenAcc = []; @@ -785,6 +787,15 @@ function fillContent(): void { avgHundredAcc.push({ x: i + 1, y: accAvgHundredValue }); } + //todo: remove temporary fix + for (let i = 0; i < chartData.length; i++) { + chartData[i].x = i + 1; + } + + for (let i = 0; i < accChartData.length; i++) { + accChartData[i].x = i + 1; + } + ChartController.accountHistory.data.datasets[0].data = chartData; ChartController.accountHistory.data.datasets[1].data = pb; ChartController.accountHistory.data.datasets[2].data = accChartData;