ng-chartjs
ng-chartjs copied to clipboard
Issue with type definitions
Chart namespace is not a type causing the issue with the example to not work.
ERROR in node_modules/ng-chartjs/lib/ng-chartjs.directive.d.ts:18:21 - error TS2694: Namespace '"C:/Users/SiliconSwamp/Documents/apps/kompwnd-frontend/node_modules/chart.js/types/index.esm"' has no exported member 'ChartDataSets'.
18 datasets: Chart.ChartDataSets[];
~~~~~~~~~~~~~
node_modules/ng-chartjs/lib/ng-chartjs.directive.d.ts:37:12 - error TS2709: Cannot use namespace 'Chart' as a type.
37 chart: Chart;
~~~~~
Seems like a versioning issue that's very recent. I fixed it by using the following versions:
npm install [email protected] --save npm install @types/[email protected]
I picked these versions as I successfully used them about 4 weeks ago on another project.