diff --git a/projects/ng2-charts/src/lib/base-chart.directive.ts b/projects/ng2-charts/src/lib/base-chart.directive.ts index 81a77cb3..67d67c17 100644 --- a/projects/ng2-charts/src/lib/base-chart.directive.ts +++ b/projects/ng2-charts/src/lib/base-chart.directive.ts @@ -9,7 +9,14 @@ import { Output, SimpleChanges, } from '@angular/core'; -import { Chart, ChartComponentLike, ChartConfiguration, ChartEvent, ChartType, DefaultDataPoint } from 'chart.js'; +import { + Chart, + ChartConfiguration, + ChartEvent, + ChartType, + DefaultDataPoint, + Plugin +} from 'chart.js'; import { ThemeService } from './theme.service'; import { Subscription } from 'rxjs'; @@ -30,7 +37,7 @@ export class BaseChartDirective['data']; @Input() public options: ChartConfiguration['options']; - @Input() public plugins: ChartComponentLike[] = []; + @Input() public plugins: Plugin[] = []; @Input() public labels?: ChartConfiguration['data']['labels']; @Input() public datasets?: ChartConfiguration['data']['datasets']; @@ -62,6 +69,7 @@ export class BaseChartDirective this.chart = new Chart(this.ctx, this.getChartConfiguration())); } @@ -158,7 +164,8 @@ export class BaseChartDirective