0

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

DirtyMind
  • 2,353
  • 2
  • 22
  • 43
  • Not sure what your issue is. I'm able to see the funnel plugin on your charts. – SiddAjmera Oct 13 '18 at 20:04
  • I added only chartjs-plugin-datalabels which is in index.html I haven't added funnel plugin. If I add them inside scripts block in angular.json file those are not working. I have asked the question related to this [here](https://stackoverflow.com/questions/52786775/primeng-chart-in-stackblitz-not-running/52787129?noredirect=1#comment92507995_52787129) – DirtyMind Oct 13 '18 at 20:12

1 Answers1

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.

Marshal
  • 10,499
  • 2
  • 34
  • 53