How to implement chart.js in Angular2

后端 未结 6 1667
刺人心
刺人心 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条回答
  •  猫巷女王i
    2020-12-14 10:09

    In the template don't forget to enclose canvas in a div. If canvas is a direct child of custom directive in dom, then chart might not load.

    I have wasted lot of time in finding this issue.

提交回复
热议问题