Moved ngIF
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div *ngIf="data" style="display: block;">
|
||||
<div style="display: block;">
|
||||
<canvas baseChart width="400" height="400"
|
||||
[datasets]="lineChartData"
|
||||
[labels]="lineChartLabels"
|
||||
|
||||
@@ -46,9 +46,7 @@ export class LineChartComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
//const newDataSet2 = [];
|
||||
//newDataSet2.push(res.labels.data.slice());
|
||||
this.lineChartLabels = this.label.data.slice(); //newDataSet2;
|
||||
this.lineChartLabels = this.label.data.slice();
|
||||
|
||||
console.log("Updated labels array");
|
||||
console.log(this.lineChartLabels);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div>
|
||||
<div *ngIf="data">
|
||||
<line-chart [label]="label" [data]="data"></line-chart>
|
||||
|
||||
<line-chart [label]="label" [data]="data2"></line-chart>
|
||||
|
||||
@@ -30,9 +30,7 @@ export class DetailComponent implements OnInit {
|
||||
.get(id)
|
||||
.subscribe(res => {
|
||||
|
||||
//const newDataSet2 = [];
|
||||
//newDataSet2.push(res.labels.data.slice());
|
||||
this.label = res.labels; //newDataSet2;
|
||||
this.label = res.labels;
|
||||
this.data = res.HOV;
|
||||
this.data2 = res.TOE1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user