summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src')
-rw-r--r--usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts4
-rw-r--r--usecaseui-portal/src/app/views/home/home.component.ts13
2 files changed, 9 insertions, 8 deletions
diff --git a/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts b/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts
index d22ffb02..85cf72ee 100644
--- a/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts
+++ b/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts
@@ -110,9 +110,9 @@ export class PieComponent implements OnInit {
})
}
- resize(size: number){
+ resize(parentHeight: number, size: number){
this.chartIntance.resize( {
- height: size - 250
+ height: parentHeight - size
})
}
diff --git a/usecaseui-portal/src/app/views/home/home.component.ts b/usecaseui-portal/src/app/views/home/home.component.ts
index 92e7e881..a7f312e6 100644
--- a/usecaseui-portal/src/app/views/home/home.component.ts
+++ b/usecaseui-portal/src/app/views/home/home.component.ts
@@ -31,7 +31,7 @@ export class HomeComponent implements OnInit {
@HostBinding('@routerAnimate') routerAnimateState;
@ViewChild('seriverChart') seriverChart;
@ViewChild('services') services: ElementRef;
-
+ resizeMark
constructor(
private myhttp: HomesService,
@@ -49,18 +49,19 @@ export class HomeComponent implements OnInit {
this.getHomeServiceBarNsData();
this.getHomeServiceBarVnfData();
this.getHomeServiceBarPnfData();
- Observable.fromEvent(window,'resize')
+ this.resizeMark = Observable.fromEvent(window,'resize')
.subscribe((event) => {
- this.seriverChart.resize(this.services.nativeElement.offsetHeight)
+ this.seriverChart.resize(this.services.nativeElement.offsetHeight,250)
})
}
ngAfterViewInit(){
- this.seriverChart.resize(this.services.nativeElement.offsetHeight)
-
-
+ this.seriverChart.resize(this.services.nativeElement.offsetHeight,250)
}
+ ngOnDestroy(){
+ this.resizeMark.unsubscribe()
+ }
// services
serviceNumber: number = 0;