I'm not sure how exactly to import a plugin into ng2-charts, specifically the annotation plugin. I'm using Angular2 / Ionic2. There doesn't seem to be any documentation or answers on this.
I would avoid to declare Chart like this.
Instead you can do import {Chart} from 'chart.js'
since it is a subdependency of ng2-charts anyway.
By this approach your IDE can still do autocompletion and you are not telling angular to just believe that there is something called Chart.
To be consistent you should also add it to your package.json.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With