score:0

Accepted answer

The problem is in trying to select the SVG tag "Network_graph". But you can't tell, because you've written you're makeGraph function as a black box. I highly recommend restructuring like so:

function makeGraph(svg, data) { // pass in the node directly
   // set up d3
}

But that's beside the point, the point is that "Network_graph" isn't really a valid css selector. You want to use the css id selector like so:

d3.select('#Network_graph');

As for the $ not being defined, try replacing with jQuery and see if the problem persists.


Related Query