mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-01 09:14:27 +08:00
Merge branch 'master' into newads
This commit is contained in:
commit
a1d00416c3
1 changed files with 16 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue