1

My goal is to create 6 donut pie charts using easypiechart.js like this: enter image description here I follow every step of the instruction from here

I believe I link all the external resources in my JSFiddle. I am not sure why, I still couldn't get them to display. Can someone help me?

JS Fiddle

code-8
  • 54,650
  • 106
  • 352
  • 604
  • First of all, classnames cannot start with number. If they do, you would need to point them with `tag[class=6]`, not `tag.6`. - Working on your Fiddle – D4V1D Mar 25 '15 at 17:20
  • Thanks. I fixed my class-name, and update my post. – code-8 Mar 25 '15 at 17:42

1 Answers1

3

Apparently you had a problem with a reference to an external resource. In your case, you should have used jquery.easypiechart.js, which is available on this CDN: https://cdnjs.cloudflare.com/ajax/libs/easy-pie-chart/2.1.4/jquery.easypiechart.js

I included into your Fiddle, and worked here

I think you still have some css problems. You should re-check your external resources.

jmartins
  • 991
  • 4
  • 16
  • Thanks for pointing that out. I was trying to link the raw code from: [https://github.com/rendro/easy-pie-chart](https://github.com/rendro/easy-pie-chart) in my fiddle. If you can show me, what is the proper way to do that will be great. – code-8 Mar 25 '15 at 17:50
  • 1
    Another quick question, where did you get that CDN from? – code-8 Mar 25 '15 at 17:53
  • In practice, you should download it from dist folder and import into your project. Remember to use the jquery version, since you want to bind it using JQuery. From here I got the CDN: http://cdnjs.com/libraries/easy-pie-chart – jmartins Mar 25 '15 at 17:53
  • I think inside JSFiddle you have only the option to point to an external URI. Besides pasting the entire code from the library, of course, not very pretty. – jmartins Mar 25 '15 at 17:57
  • Let's put the CDN aside, I got that now. Just wondering, have you personally link any raw code like *anything*.min.js directly from GitHub to your Fiddle? What do you know what I mean ? – code-8 Mar 25 '15 at 18:03
  • GitHub doesn't really give you the raw code when you link it. Just do a simple test and "Save Link As..." in a js file link inside github. Open the downloaded js file, and you will see a bunch of html, which actually composes the page where GitHub shows the code. – jmartins Mar 25 '15 at 18:06
  • 1
    Check this out : [https://raw.githubusercontent.com/rendro/easy-pie-chart/master/dist/jquery.easypiechart.js](https://raw.githubusercontent.com/rendro/easy-pie-chart/master/dist/jquery.easypiechart.js) – code-8 Mar 25 '15 at 18:23
  • Is CDN is the only way to link to Fiddle External Resource then ? – code-8 Mar 25 '15 at 18:24
  • Cool. Didn't know that one. That's actually a good question. You should ask here on StackOverflow. – jmartins Mar 25 '15 at 18:26
  • 1
    all right, I will ask about this later. Thanks for help. – code-8 Mar 25 '15 at 18:27