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<...>>'. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@tommy86r I wasn't able to open your link. Anyway I used another sample, adding the annotation: and it seems working |
Beta Was this translation helpful? Give feedback.
@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