1
1
import { NgStyle } from '@angular/common' ;
2
- import { Component , DestroyRef , effect , inject , OnInit , Renderer2 , signal , WritableSignal , DOCUMENT } from '@angular/core' ;
2
+ import { Component , DestroyRef , DOCUMENT , effect , inject , OnInit , Renderer2 , signal , WritableSignal } from '@angular/core' ;
3
3
import { FormControl , FormGroup , ReactiveFormsModule } from '@angular/forms' ;
4
4
import { ChartOptions } from 'chart.js' ;
5
5
import {
@@ -13,11 +13,9 @@ import {
13
13
ColComponent ,
14
14
FormCheckLabelDirective ,
15
15
GutterDirective ,
16
- ProgressBarDirective ,
17
16
ProgressComponent ,
18
17
RowComponent ,
19
- TableDirective ,
20
- TextColorDirective
18
+ TableDirective
21
19
} from '@coreui/angular' ;
22
20
import { ChartjsComponent } from '@coreui/angular-chartjs' ;
23
21
import { IconDirective } from '@coreui/icons-angular' ;
@@ -41,9 +39,9 @@ interface IUser {
41
39
}
42
40
43
41
@Component ( {
44
- templateUrl : 'dashboard.component.html' ,
45
- styleUrls : [ 'dashboard.component.scss' ] ,
46
- imports : [ WidgetsDropdownComponent , TextColorDirective , CardComponent , CardBodyComponent , RowComponent , ColComponent , ButtonDirective , IconDirective , ReactiveFormsModule , ButtonGroupComponent , FormCheckLabelDirective , ChartjsComponent , NgStyle , CardFooterComponent , GutterDirective , ProgressBarDirective , ProgressComponent , WidgetsBrandComponent , CardHeaderComponent , TableDirective , AvatarComponent ]
42
+ templateUrl : 'dashboard.component.html' ,
43
+ styleUrls : [ 'dashboard.component.scss' ] ,
44
+ imports : [ WidgetsDropdownComponent , CardComponent , CardBodyComponent , RowComponent , ColComponent , ButtonDirective , IconDirective , ReactiveFormsModule , ButtonGroupComponent , FormCheckLabelDirective , ChartjsComponent , NgStyle , CardFooterComponent , GutterDirective , ProgressComponent , WidgetsBrandComponent , CardHeaderComponent , TableDirective , AvatarComponent ]
47
45
} )
48
46
export class DashboardComponent implements OnInit {
49
47
@@ -151,6 +149,7 @@ export class DashboardComponent implements OnInit {
151
149
}
152
150
153
151
initCharts ( ) : void {
152
+ this . mainChartRef ( ) ?. stop ( ) ;
154
153
this . mainChart = this . #chartsData. mainChart ;
155
154
}
156
155
0 commit comments