From 1359fad5f2f2e0fde96336715b3cd11ca69d33c4 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 27 Feb 2023 09:41:56 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E9=A6=96=E9=A1=B5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/home-page/home-page.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts index fc9f13f..d8456a0 100644 --- a/src/app/pages/home-page/home-page.component.ts +++ b/src/app/pages/home-page/home-page.component.ts @@ -736,7 +736,7 @@ export class HomePageComponent implements OnInit { this.warningechartpieOptionAll.series[0].data = data.violationType.violationTypeAggAll; this.warningechartpieOptionAll.series[0].label.normal.formatter = - "{total|" + violationTypeAggCountAll + "}" + "\n\r" + "{active|累计预警}"; + "{total|" + data.recordCount + "}" + "\n\r" + "{active|累计预警}"; this.warningechartpieAll.setOption(this.warningechartpieOptionAll); // 可调用clearLoop方法,清除定时器 @@ -791,8 +791,8 @@ export class HomePageComponent implements OnInit { //下面两个柱状图 - isSpinOfEventWarning = false; - isSpinOfOilDischarge = false; + isSpinOfEventWarning = true; + isSpinOfOilDischarge = true; get30daysViolate(type, data) { //type = true 代表预警 false代表卸油 type @@ -828,6 +828,7 @@ export class HomePageComponent implements OnInit { let violationTypeAggCount = 0; let monthArr = []; let valuedata = []; + data.forEach((element) => { violationTypeAggCount += element.count; monthArr.push(moment(element.key).format("MM.DD")); @@ -854,7 +855,6 @@ export class HomePageComponent implements OnInit { }; } this.warningechartbar.setOption(this.warningechartbarOption); - this.warningechartpieOption.series[0].label.normal.formatter = "{total|" + violationTypeAggCount + "}" + "\n\r" + "{active|预警事件}"; this.warningechartpie.setOption(this.warningechartpieOption);