How to implement chart.js in Angular2

后端 未结 6 1651
刺人心
刺人心 2020-12-14 09:19

I\'m using Angular2-rc4 with angular-cli webpack and would like to implement a chart.js library.

I\'ve installed chart.js to my project using:

6条回答
  •  遥遥无期
    2020-12-14 10:04

    I had this problem using primeNG.

    Just add this in your index.html:

    
    

    And that´s it, you don´t have to import in your typescript.

    I found that in chart documentation

    -then use a Chart.js CDN.

    https://cdnjs.com/libraries/Chart.js

提交回复
热议问题