score:2

Accepted answer

for each object, set the url of the image:

{name: "1", rating: 90, id: 2951, url: "someurl"},

then, instead of appending circles, append an image

 node.append("image")
     .attr("xlink:href", d=> d.url)
     .attr("x", -width/2)
     .attr("y", -height/2)
     .attr("width", width)
     .attr("height", height);

where width and height are the corresponding image width and height.

ps: have in mind that i'm simply answering your question ("how may i assign images into each node?"). if giving up the circles is not an option for you, you'll have to use a pattern.


Related Query

More Query from same tag