Question

http://jsfiddle.net/amanminhas16/KUf7f/

var root = {
    "name"    : "Total Number Of Users",
    "size"    : 50000,
    "children": [{
        "name":"user A"
    },
    {
        "name":"user B"
    },
    {
        "name":"user C"
    },
    {
        "name":"user D"
    },
      ]
};

this was inspired by

http://jsfiddle.net/augburto/YMa2y/

But even if i get the exact code, i do not get a graph output. If i copy my code into his jsfiddle, it gives me my desired result. can you tell me what could be the issue ?

i am using WAMP + Zend.

Thank you in adv.

Was it helpful?

Solution 2

Thanks a lot for your suggestion.

But actually, The problem was that i did not put my javascript code in

$(document).ready(function(){//here})

It works great now :) ..

Thank you Christopher and FernOfTheAndes for all the help

OTHER TIPS

The documentation page explains quite well how to setup d3 in your localhost.

You have to:

  • include d3.js in your page using: <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>

  • start a python server if you want to access local files using: python -m SimpleHTTPServer 8888 &

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top