ng2-charts
ng2-charts copied to clipboard
Documentation of line chart lacks info on registering AnnotationPlugin
I tried to setup a line chart as described in https://valor-software.com/ng2-charts/#LineChart.
Unfortunately, I couldn't get the chart to render as there was a problem with the annotation plugin. The chart was only displayed once I removed the annotation.
I then discovered that the AnnotationPlugin needs to be registered as described here https://www.chartjs.org/chartjs-plugin-annotation/latest/guide/integration.html. The line Chart.register(AnnotationPlugin)
did it for me.
This should be added to the example in the docs, or what do you think?
@aljoshakoecher Definitely worth adding, I've just spent hours trying to get it to work until I saw your post.
Yeah I faced the same issue and spent hours figuring out untill I saw the documentation page of that plugin. Duplicate of #1357
The Chart.register call is present in the example docs