does it work with ng2-chart 3 ? #784
|
I'm trying to use chartjs-plugin-annotation v2 with ng-chart v3 but it doesn't seem to work. It's a simple project, I installed chart.js, ng2-chart and chartjs-plugin-annotation. So, I registered the plugin And I used it in a chart: I get the following error: _Type '{ scales: { y: { beginAtZero: boolean; }; }; plugins: { annotation: { annotations: { type: string; borderColor: string; borderWidth: number; scaleID: string; value: number; }[]; }; }; }' is not assignable to type 'DeepPartialObject<CoreChartOptions & ElementChartOptions & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>>'. |
Answered by
stockiNail
Aug 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@tommy86r I wasn't able to open your link. Anyway I used another sample, adding the annotation:
https://stackblitz.com/edit/labs-ng2-charts-3-eesdlj?file=src/app/time-series/time-series.component.ts
and it seems working