impr(account page): change time typing unit to minutes on the activity chart (fehmer) (#4618)

This commit is contained in:
Christian Fehmer 2023-09-11 19:53:00 +02:00 committed by GitHub
parent ad3d021a9d
commit 6d57a1949e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -598,12 +598,12 @@ export const accountActivity: ChartWithUpdateColors<
ticks: {
autoSkip: true,
autoSkipPadding: 20,
stepSize: 10,
stepSize: 1,
},
display: true,
title: {
display: true,
text: "Time Typing",
text: "Time typing (minutes)",
},
},
avgWpm: {
@ -648,7 +648,7 @@ export const accountActivity: ChartWithUpdateColors<
switch (tooltipItem.datasetIndex) {
case 0:
return `Time Typing: ${Misc.secondsToString(
Math.round(resultData.y),
Math.round(resultData.y * 60),
true,
true
)}\nTests Completed: ${resultData.amount}`;

View file

@ -679,7 +679,7 @@ async function fillContent(): Promise<void> {
});
activityChartData_time.push({
x: dateInt,
y: Misc.roundTo2(activityChartData[dateInt].time),
y: activityChartData[dateInt].time / 60,
amount: activityChartData[dateInt].amount,
});
activityChartData_avgWpm.push({