I am using this: http://mbostock.github.io/d3/talk/20111018/partition.html
instead of d3.json("flare.json", function(root) {
how do i make it use the json file within the html, like say i have
var json = [{
"name": "flare",
"children": [
{"name": "analytics",
"children": [
{"name": "cluster","children": [{"name": "AgglomerativeCluster", "size": 3938},
{"name": "CommunityStructure", "size": 3812},
{"name": "HierarchicalCluster", "size": 6714},
{"name": "MergeEdge", "size": 743}
]
},
and i want to use this instead of an external json file, how do i achieve this?
Link to json file: http://mbostock.github.io/d3/talk/20111018/flare.json
Any JSFiddle example please?
Thank you.