From 3eac132857000417d7f67044795ef60bf88c3fda Mon Sep 17 00:00:00 2001 From: shimingxy Date: Thu, 13 Mar 2025 18:31:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=90=8E=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=9B=BE=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/routes/dashboard/home/home.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/dashboard/home/home.component.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/dashboard/home/home.component.ts index 5c481d28..02b68881 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/dashboard/home/home.component.ts +++ b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/dashboard/home/home.component.ts @@ -111,11 +111,12 @@ export class HomeComponent implements OnInit { const beginDay = new Date().getTime(); const fakeY = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5]; + this.simulateData = [fakeY.length]; for (let i = 0; i < fakeY.length; i += 1) { - this.simulateData.push({ + this.simulateData[i] = { x: format(new Date(beginDay + 1000 * 60 * 60 * 24 * i), 'yyyy-MM-dd'), y: fakeY[i] - }); + }; } this.dayData = []; for (let i = 0; i < res.data.reportDayHour.length; i += 1) {