How to add chartjs plugin funnel, plugin in stackblitz?

天大地大妈咪最大 提交于 2019-12-11 16:43:21

问题


I am trying to create an angular6 Primeng 6 app in stackblitz. I am using PrimeNg chart in it. Also I want to add use chartjs-plugin-datalabels and chartjs-plugin-funnel . I am able to ChartJs and chartjs-plugin-datalabels but not able to find how to use chartjs-plugin-funnel. Chartjs funnel NPM

My Stackbliz URL


回答1:


Update: Sorry was away from keyboard when I posted the last link, I am at computer now and had a chance to play with this a bit. This one is a little different from the other two, because the releases on YetiForceCompany github the url's don't automatically download the minified .js file like the other two when you navigate to them... their release api is the complete project source in a zip file and this will not work in a script tag with url as the src.

For this one to work in stackblitz you are going to have to do the following.

  1. Go to this link for the RAW version https://raw.githubusercontent.com/YetiForceCompany/chartjs-plugin-funnel/master/dist/chart.funnel.bundled.min.js
  2. You are then going to have to select all and copy the entire minified raw code.
  3. Then paste the entire thing wrapped in a <script></script> tag into your index.html, do not use src... yes, paste the entire long blob of raw code between an open and close script tag.

This should get this plugin to work from your stackblitz... this one is just unique because the github releases for this plugin are not setup properly to use in the src of a script tag.



来源:https://stackoverflow.com/questions/52796726/how-to-add-chartjs-plugin-funnel-plugin-in-stackblitz

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