Reputation: 3
I am using this example: http://bl.ocks.org/robschmuecker/7880033. I want to add image before each node text and also have different font-style to each node.
Thanks in advance.
Upvotes: 0
Views: 331
Reputation: 4511
I haven't tested it but this may work:
nodeEnter.append("svg:image")
.attr('width', 20)
.attr('height', 20)
.attr("xlink:href","img/myimage.png");
Add it to the 'update' function, once nodeEnter is created.
Upvotes: 1