perbaikan style monitoring building
This commit is contained in:
parent
a1f3069c05
commit
fcc9a97d99
|
@ -7,7 +7,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:host ::ng-deep .donut-chart1 .ct-series-a .ct-slice-donut {
|
:host ::ng-deep .donut-chart1 .ct-series-a .ct-slice-donut {
|
||||||
stroke: #49ff52;
|
stroke: #01a32f;
|
||||||
stroke-width: 20px !important;
|
stroke-width: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:host ::ng-deep .donut-chart2 .ct-series-a .ct-slice-donut {
|
:host ::ng-deep .donut-chart2 .ct-series-a .ct-slice-donut {
|
||||||
stroke: #fff049;
|
stroke: #dcdf03;
|
||||||
stroke-width: 20px !important;
|
stroke-width: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:host ::ng-deep .donut-chart3 .ct-series-a .ct-slice-donut {
|
:host ::ng-deep .donut-chart3 .ct-series-a .ct-slice-donut {
|
||||||
stroke: #ff4c49;
|
stroke: #d50c08;
|
||||||
stroke-width: 20px !important;
|
stroke-width: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,3 +35,12 @@
|
||||||
stroke: #757575;
|
stroke: #757575;
|
||||||
stroke-width: 20px !important;
|
stroke-width: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-no-hover {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-no-hover:hover {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: inherit !important;
|
||||||
|
}
|
||||||
|
|
|
@ -50,7 +50,14 @@
|
||||||
<hr style="border-top: 3px solid #100a0a" />
|
<hr style="border-top: 3px solid #100a0a" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="donut-chart2">
|
<div
|
||||||
|
[ngClass]="{
|
||||||
|
'donut-chart1': data.donut.series[0] <= 50,
|
||||||
|
'donut-chart2':
|
||||||
|
data.donut.series[0] > 50 && data.donut.series[0] < 75,
|
||||||
|
'donut-chart3': data.donut.series[0] >= 75
|
||||||
|
}"
|
||||||
|
>
|
||||||
<x-chartist
|
<x-chartist
|
||||||
*ngIf="data"
|
*ngIf="data"
|
||||||
[data]="data.donut"
|
[data]="data.donut"
|
||||||
|
@ -79,53 +86,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body" style="padding-top: 0">
|
<div class="card-body" style="padding-top: 0">
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col Started">
|
<div
|
||||||
|
class="col-xl-6 col-md-6 col-12"
|
||||||
|
*ngFor="let top of dataTop; let i = index"
|
||||||
|
>
|
||||||
<span class="mb-1 text-muted cardtext d-block"
|
<span class="mb-1 text-muted cardtext d-block"
|
||||||
>23% - Lighning</span
|
>{{ top.value[i] }}% - {{ top.label[i] }}</span
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<ngb-progressbar
|
|
||||||
height="7px"
|
|
||||||
type="success"
|
|
||||||
[value]="23"
|
|
||||||
></ngb-progressbar>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col Progress">
|
|
||||||
<span class="mb-1 text-muted cardtext d-block"
|
|
||||||
>14% - In Progress</span
|
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<ngb-progressbar
|
<ngb-progressbar
|
||||||
height="7px"
|
height="7px"
|
||||||
type="danger"
|
type="danger"
|
||||||
[value]="14"
|
[value]="top.value[i]"
|
||||||
></ngb-progressbar>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col Remaining">
|
|
||||||
<span class="mb-1 text-muted cardtext d-block"
|
|
||||||
>35% - Remaining</span
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<ngb-progressbar
|
|
||||||
height="7px"
|
|
||||||
type="warning"
|
|
||||||
[value]="35"
|
|
||||||
></ngb-progressbar>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col Done">
|
|
||||||
<span class="mb-1 text-muted cardtext d-block"
|
|
||||||
>28% - Started</span
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<ngb-progressbar
|
|
||||||
height="7px"
|
|
||||||
type="primary"
|
|
||||||
[value]="28"
|
|
||||||
></ngb-progressbar>
|
></ngb-progressbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,12 +7,12 @@ import { TableMonitoringService } from "../monitoring.service";
|
||||||
styleUrls: ["./building.component.css"],
|
styleUrls: ["./building.component.css"],
|
||||||
})
|
})
|
||||||
export class BuildingComponent {
|
export class BuildingComponent {
|
||||||
Data: any;
|
data: any;
|
||||||
public breadcrumb: any;
|
public breadcrumb: any;
|
||||||
feedbacksdonutChart: any;
|
feedbacksdonutChart: any;
|
||||||
donutChart1: any;
|
donutChart1: any;
|
||||||
filteredRows: any[];
|
filteredRows: any[];
|
||||||
data: any[];
|
dataTop: any[];
|
||||||
searchTerm: string = "";
|
searchTerm: string = "";
|
||||||
colorChart: string = "";
|
colorChart: string = "";
|
||||||
|
|
||||||
|
@ -32,12 +32,9 @@ export class BuildingComponent {
|
||||||
this.donutChart1 = {
|
this.donutChart1 = {
|
||||||
type: "Pie",
|
type: "Pie",
|
||||||
options: {
|
options: {
|
||||||
donut: {
|
|
||||||
colors: ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff']
|
|
||||||
},
|
|
||||||
fullwidth: true,
|
fullwidth: true,
|
||||||
height: "250px",
|
height: "250px",
|
||||||
|
donut: true,
|
||||||
donutWidth: 60,
|
donutWidth: 60,
|
||||||
startAngle: 270,
|
startAngle: 270,
|
||||||
total: 200,
|
total: 200,
|
||||||
|
@ -48,18 +45,14 @@ export class BuildingComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.monitoringService.getMonitoringBuildingData().subscribe((Response) => {
|
this.monitoringService.getMonitoringBuildingData().subscribe((res) => {
|
||||||
this.data = Response
|
this.data = res
|
||||||
this.filteredRows = Response
|
this.filteredRows = res
|
||||||
for (let i = 0; i < this.filteredRows.length; i++) {
|
this.dataTop = res.map(item => ({
|
||||||
if (this.filteredRows[i].donut.series[0] <= 50) {
|
label: item.topUse.label,
|
||||||
this.colorChart = "donut-chart1"
|
value: item.topUse.value
|
||||||
} else if (this.filteredRows[i].donut.series[0] > 50 && this.filteredRows[i].donut.series[0] < 75) {
|
}));
|
||||||
this.colorChart = "donut-chart2"
|
|
||||||
} else {
|
|
||||||
this.colorChart = "donut-chart3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"build_name": "PT Allbest Solusi Sistem",
|
"build_name": "PT Allbest Solusi Sistem",
|
||||||
"total": "2345",
|
"total": "342",
|
||||||
|
"topUse": {
|
||||||
|
"label": ["Lightning", "Air Conditioner", "Security System", "Elevator"],
|
||||||
|
"value": [20, 40, 10, 30]
|
||||||
|
},
|
||||||
"donut": {
|
"donut": {
|
||||||
"series": [20, 80],
|
"series": [20, 80],
|
||||||
"labels": []
|
"labels": []
|
||||||
|
@ -11,7 +15,11 @@
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"build_name": "PT Informa Media Pratama",
|
"build_name": "PT Informa Media Pratama",
|
||||||
"total": "342",
|
"total": "670",
|
||||||
|
"topUse": {
|
||||||
|
"label": ["Lightning", "Air Conditioner", "Security System", "Elevator"],
|
||||||
|
"value": [20, 40, 10, 30]
|
||||||
|
},
|
||||||
"donut": {
|
"donut": {
|
||||||
"series": [40, 60],
|
"series": [40, 60],
|
||||||
"labels": []
|
"labels": []
|
||||||
|
@ -20,16 +28,24 @@
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"build_name": "PT Ikea",
|
"build_name": "PT Ikea",
|
||||||
"total": "342",
|
"total": "1480",
|
||||||
|
"topUse": {
|
||||||
|
"label": ["Lightning", "Air Conditioner", "Security System", "Elevator"],
|
||||||
|
"value": [20, 40, 10, 30]
|
||||||
|
},
|
||||||
"donut": {
|
"donut": {
|
||||||
"series": [50, 50],
|
"series": [70, 30],
|
||||||
"labels": []
|
"labels": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"build_name": "PT Tokopedia",
|
"build_name": "PT Tokopedia",
|
||||||
"total": "342",
|
"total": "2050",
|
||||||
|
"topUse": {
|
||||||
|
"label": ["Lightning", "Air Conditioner", "Security System", "Elevator"],
|
||||||
|
"value": [20, 40, 10, 30]
|
||||||
|
},
|
||||||
"donut": {
|
"donut": {
|
||||||
"series": [90, 10],
|
"series": [90, 10],
|
||||||
"labels": []
|
"labels": []
|
||||||
|
|
Loading…
Reference in New Issue