ng-chartjs icon indicating copy to clipboard operation
ng-chartjs copied to clipboard

Issue with type definitions

Open Lizard-King101 opened this issue 3 years ago • 1 comments

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;
              ~~~~~

Lizard-King101 avatar Apr 06 '21 14:04 Lizard-King101

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.

eagerowl avatar Apr 09 '21 20:04 eagerowl