From 19a15c030d162f683e1746a69f2fc681bdf38dcd Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 10 Dec 2023 10:29:01 -0500 Subject: [PATCH] 2 hour chart --- src/app/components/dashboard/dashboard.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/dashboard/dashboard.component.ts b/src/app/components/dashboard/dashboard.component.ts index d1331a4..9b42b29 100644 --- a/src/app/components/dashboard/dashboard.component.ts +++ b/src/app/components/dashboard/dashboard.component.ts @@ -71,7 +71,7 @@ export class DashboardComponent implements AfterViewInit { for (let i = GROUP_SIZE; i < chartData.length; i += GROUP_SIZE) { let sum = 0; for (let j = GROUP_SIZE - 1; j >= 0; j--) { - sum += chartData[i - j].data; + sum += parseInt(chartData[i - j].data); } sum = sum / GROUP_SIZE; hourlyData.push({ y: sum, x: chartData[i].label });