PrimeNg Chart in stackblitz not running?

谁说胖子不能爱 提交于 2020-01-06 07:13:55

问题


This is the first time i am trying to make an stackblitz app with Angular6, Primeng 6 . I am trying to create Primeng chart with it. I installed Chartjs and also updated the angular.json file, as given in Primeng documentation but it is throwing error saying Chart is not defined. Can anyone help me to resolve this issue. Same thing is working perfectly in my local setup.

Here is the link: stackblitz link


回答1:


Placing these two script lines in the index.html file allows it to run natively in stackblitz.

<script src="https://github.com/chartjs/Chart.js/releases/download/v2.7.2/Chart.bundle.min.js"></script>
  <script src="https://github.com/chartjs/chartjs-plugin-datalabels/releases/download/v0.4.0/chartjs-plugin-datalabels.min.js"></script>


来源:https://stackoverflow.com/questions/52786775/primeng-chart-in-stackblitz-not-running

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!