charts
1 TopicChartJs How to Include and Consume
I am trying to use this web page to create a Chart.JS webpart. https://dataninjago.com/2016/11/28/building-sharepoint-framework-client-side-chart-web-parts-using-chart-js/ I am having only one problem when I try to consume the ChartJS object at this line of code: const chart = new jsChart(ctx, { The error is: Error - [tsc] src/webparts/chartJs/components/ChartJs.tsx(38,19): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. I am adding the ChartJS cdn in the config.json file in the externals section: "externals": { "jsChart": { "path": "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.bundle.min.js", "globalName": "jsChart" } } What am I supposed to be doing differently?Solved2.2KViews0likes1Comment