Reputation: 353
I'm looking at this: http://bl.ocks.org/mbostock/4063550
I want to embed the json data inside the script as opposed to using d3's internal function. I tried a variety of things like assigning the data to a var etc. but it doesn't seem to work.
How do you do this, for this example in particular?
Upvotes: 0
Views: 33
Reputation: 109232
In general, you would assign the contents of the JSON to a variable, like so:
var json = {...};
In this case in particular, have a look here.
Upvotes: 1