Skip to content

Commit

Permalink
impr(account page): change time typing unit to minutes on the activit…
Browse files Browse the repository at this point in the history
…y chart (fehmer) (#4618)
  • Loading branch information
fehmer committed Sep 11, 2023
1 parent ad3d021 commit 6d57a19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions frontend/src/ts/controllers/chart-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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}`;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ts/pages/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 6d57a19

Please sign in to comment.