Home forums Chart Support CanvasJS is not defined

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #15525

    I am using CanvasJS in my angular 2 app but i am having some trouble loading my page with charts.

    I have added to my index.html page:
    <script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>

    in my component.ts file i have added:

    declare var CanvasJS: any;
    var chart = new CanvasJS.Chart("chartContainer", {.....});

    but when i run this i get several errors in my console:
    Error: Error in :0:0 caused by: CanvasJS is not defined



    Please take a look at this sample project for Angular2.

    Sanjoy Debnath
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.