I’m trying to get the sample code for a force directed graph working.
The difference is I have added the JSON directly to the code. That seems to be enough to break it.
I think the problem starts here:
var link = svg.append("g")
.attr("class", "links")
.selectAll("line")
.data(graph.links)
.enter().append("line")
.attr("stroke-width", function(d) { return Math.sqrt(d.value); });