diff --git a/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts b/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts index 1ec741d..1fae177 100644 --- a/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts +++ b/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts @@ -97,8 +97,6 @@ export class ControlDeviceSeemoreComponent { dataListBuilding() { this.monitoringApiService.getBuildingList().subscribe((data) => { this.dataBuildingList = data.data.filter((item) => item.statusId === 2); - console.log(this.dataBuildingList); - }); } diff --git a/src/app/content/hemat-app/monitoring/detail/detail.component.ts b/src/app/content/hemat-app/monitoring/detail/detail.component.ts index 8a441eb..17afbba 100644 --- a/src/app/content/hemat-app/monitoring/detail/detail.component.ts +++ b/src/app/content/hemat-app/monitoring/detail/detail.component.ts @@ -62,18 +62,18 @@ export class DetailComponent { barPercentage: 0.5, categoryPercentage: 0.5, }, - { - data: [], - label: "Water Consumption", - backgroundColor: "#64CFF1", - borderColor: "#64CFF1", - pointBackgroundColor: "#64CFF1", - pointBorderColor: "#64CFF1", - pointHoverBackgroundColor: "#ffffff", - pointHoverBorderColor: "#64CFF1", - barPercentage: 0.5, - categoryPercentage: 0.5, - }, + // { + // data: [], + // label: "Water Consumption", + // backgroundColor: "#64CFF1", + // borderColor: "#64CFF1", + // pointBackgroundColor: "#64CFF1", + // pointBorderColor: "#64CFF1", + // pointHoverBackgroundColor: "#ffffff", + // pointHoverBorderColor: "#64CFF1", + // barPercentage: 0.5, + // categoryPercentage: 0.5, + // }, { type: "line", data: [], @@ -89,21 +89,21 @@ export class DetailComponent { tension: 0.3, spanGaps: true }, - { - type: "line", - data: [], - label: "Weekly Water Average", - backgroundColor: "rgba(0,255,255,0)", - borderColor: "#ffffff", - fill: false, - pointBorderColor: "#ffffff", - pointBackgroundColor: "#FFF", - pointBorderWidth: 2, - pointHoverBorderWidth: 2, - pointRadius: 4, - tension: 0.3, - spanGaps: true - }, + // { + // type: "line", + // data: [], + // label: "Weekly Water Average", + // backgroundColor: "rgba(0,255,255,0)", + // borderColor: "#ffffff", + // fill: false, + // pointBorderColor: "#ffffff", + // pointBackgroundColor: "#FFF", + // pointBorderWidth: 2, + // pointHoverBorderWidth: 2, + // pointRadius: 4, + // tension: 0.3, + // spanGaps: true + // }, ]; //.......................... @@ -261,15 +261,15 @@ export class DetailComponent { .subscribe((res) => { this.chartKwhWater = res.data; this.barChartData[0].data = []; - this.barChartData[1].data = []; + // this.barChartData[1].data = []; this.chartKwhWater.forEach((entry) => { this.barChartData[0].data.push(entry.kwh); - this.barChartData[1].data.push(entry.water); + // this.barChartData[1].data.push(entry.water); this.barChartLabels.push(entry.day); }); const weeklyKwh = this.aggregateKwhWeekly(this.chartKwhWater); - const weeklyWater = this.aggregateWaterWeekly(this.chartKwhWater); + // const weeklyWater = this.aggregateWaterWeekly(this.chartKwhWater); // Populate Appointment data at every multiple of 7 let weekIndex = 0; @@ -281,14 +281,14 @@ export class DetailComponent { } } - let weekIndexWater = 0; - for (let i = 0; i < this.barChartData[0].data.length; i++) { - if (i % 7 === 6 && weekIndexWater < weeklyWater.length) { - this.barChartData[3].data[i] = weeklyWater[weekIndexWater++]; - } else { - this.barChartData[3].data[i] = null; - } - } + // let weekIndexWater = 0; + // for (let i = 0; i < this.barChartData[0].data.length; i++) { + // if (i % 7 === 6 && weekIndexWater < weeklyWater.length) { + // this.barChartData[3].data[i] = weeklyWater[weekIndexWater++]; + // } else { + // this.barChartData[3].data[i] = null; + // } + // } }); } aggregateKwhWeekly(data: any[]): number[] {