External Library with TypeScript

478
1
11-13-2020 09:56 AM
michael_vetter
Occasional Contributor

I'm new to using TypeScript and had a question regarding how to use external libraries with the ArcGIS for JavaScript API. I'm trying to use the Chart.js library within my application, but I'm not sure how I would incorporate the library into the application. Is it as easy as using NPM to install the library?

Thanks for the help!

Michael

0 Kudos
1 Reply
NicholasRomano1
New Contributor II

Yes, it is as easy as using a npm package, but you'll need to adjust your project to use a package like esri-loader to load the API.

 

If you're not familiar with npm and build systems, you could just use the chart.js CDN and include it as a script tag.

0 Kudos