Skip to content

Commit

Permalink
fix(account page): account activity showing undefined tests completed…
Browse files Browse the repository at this point in the history
… on hover
  • Loading branch information
Miodec committed Jan 31, 2024
1 parent 9e394be commit f57bac8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions frontend/src/ts/pages/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,8 @@ async function fillContent(): Promise<void> {
loadMoreLines();
////////

const activityChartData_amount: MonkeyTypes.ActivityChartDataPoint[] = [];
const activityChartData_time: MonkeyTypes.ActivityChartDataPoint[] = [];
const activityChartData_timeAndAmount: MonkeyTypes.ActivityChartDataPoint[] =
[];
const activityChartData_avgWpm: MonkeyTypes.ActivityChartDataPoint[] = [];
const wpmStepSize = typingSpeedUnit.historyStepSize;

Expand All @@ -684,11 +684,7 @@ async function fillContent(): Promise<void> {

if (dataPoint === undefined) continue;

activityChartData_amount.push({
x: dateInt,
y: dataPoint.amount,
});
activityChartData_time.push({
activityChartData_timeAndAmount.push({
x: dateInt,
y: dataPoint.time / 60,
amount: dataPoint.amount,
Expand All @@ -714,7 +710,7 @@ async function fillContent(): Promise<void> {
accountActivityAvgWpmOptions.ticks.stepSize = wpmStepSize;

ChartController.accountActivity.getDataset("count").data =
activityChartData_amount;
activityChartData_timeAndAmount;
ChartController.accountActivity.getDataset("avgWpm").data =
activityChartData_avgWpm;

Expand Down

0 comments on commit f57bac8

Please sign in to comment.