[Chartjs]-How to dynamically use chartjs-plugin-annotation with ng2-charts?

1👍

I ran into this today and solved it by calling:

this.chart.ngOnChanges({});

instead of

this.chart.update()

The ngOnChanges call causes the chart to update and display the annotations I added programmatically whereas when calling update, they would not show at all. Hopefully this helps anyone who stumbles on this issue going forward.

Leave a comment