8đź‘Ť
âś…
This is because, Chart.PieceLabel.js
plugin doesn’t have any exported member (neither named nor default). It just registers itself into the Chart.js plugin-service.
So, your import
statement should be :
import 'chart.piecelabel.js';
instead of :
import * as ChartPiece from 'chart.piecelabel.js'
sidenote: you don’t need to include this plugin script in angular-cli.json
0đź‘Ť
delete import “chart.piecelabel.js”, from component and add it in app.module.ts after the ng2-charts like this:
import { ChartsModule } from "ng2-charts";
import "chart.piecelabel.js";
Source:stackexchange.com