@nikhil41425,
Please follow the below steps to import CanvasJS in your Angular project.
1. Download the trial version of CanvasJS library package from the download page – https://canvasjs.com/download-html5-charting-graphing-library/?f=chart
2. Extract the files, and copy canvasjs.min.js.
3. Paste canvasjs.min.js in your angular_project/src/assets file.
In case you are still facing the issue please create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with sample data so that we can look into your code, run it locally at our end, and help you out.
___________
Indranil Deo
Team CanvasJS