11import { 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' ;
33import { FormControl , FormGroup , ReactiveFormsModule } from '@angular/forms' ;
44import { ChartOptions } from 'chart.js' ;
55import {
@@ -13,11 +13,9 @@ import {
1313 ColComponent ,
1414 FormCheckLabelDirective ,
1515 GutterDirective ,
16- ProgressBarDirective ,
1716 ProgressComponent ,
1817 RowComponent ,
19- TableDirective ,
20- TextColorDirective
18+ TableDirective
2119} from '@coreui/angular' ;
2220import { ChartjsComponent } from '@coreui/angular-chartjs' ;
2321import { IconDirective } from '@coreui/icons-angular' ;
@@ -41,9 +39,9 @@ interface IUser {
4139}
4240
4341@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 ]
4745} )
4846export class DashboardComponent implements OnInit {
4947
@@ -151,6 +149,7 @@ export class DashboardComponent implements OnInit {
151149 }
152150
153151 initCharts ( ) : void {
152+ this . mainChartRef ( ) ?. stop ( ) ;
154153 this . mainChart = this . #chartsData. mainChart ;
155154 }
156155
0 commit comments