Adriel Klein
Adriel Klein

Reputation: 143

How to modify Collapsable Tree D3JS: http://bl.ocks.org/d/4339083/

I would like to modify the Collapsable Tree located at the following URL: http://bl.ocks.org/d/4339083/

I have tried copying the source code at think link to a text file and then I try to display it on my browser but I get an empty screen.

I changed the following code in the source code:

d3.json("/d/4063550/flare.json", function(error, flare) {

to

d3.json("http://bl.ocks.org/d/4063550/flare.json", function(error, flare) {

but that didn't work either.

I would like to modify the original HTML file so that I can put my own text on top of each node. I would also like to change the amount of nodes. How can I do this?

Upvotes: 2

Views: 1968

Answers (1)

rekire
rekire

Reputation: 47975

You are breaking the same orgin policy. You cannot do cross domain calls.

There is a technique called JSONP which is also supported by jQuery.

Upvotes: 3

Related Questions