How do I replace a node with an image using D3 and CoffeeScript for a network visualization?
- 阅读更多 关于 How do I replace a node with an image using D3 and CoffeeScript for a network visualization?
I've been attempting to solve this problem for days, and am completely stumped. I'm using this network implementation walk-through: http://flowingdata.com/2012/08/02/how-to-make-an-interactive-network-visualization/ I have successfully created my visualization through this walk-through, and now would like to replace a node with a small picture, based on the node's value. This is a great example of code to work from, where every node was replaced with an image. http: //bl.ocks .org/mbostock/950642 Specifically: node.append("image") .attr("xlink:href", "https://github.com/favicon.ico") .attr("x"