Basically, I try to assign a class into the node.append("image")
and try to use border-radius: 50% to turn them to circle, but the CSS do not seem like it applied on those images.
node.append("image")
.attr("xlink:href", d=> d.url)
//Assigned a class for all nodes
.classed("MakeItround", true)
//people icon's location (x,y)
.attr("x", function(d) { return d.weight * 2-35; })
.attr("y", height/15 -38)
//people icon's size
.attr("width", width/15)
.attr("height", height/15)
This is the CSS I'd like to apply to the images
.MakeItround{
border-radius: 50%;
}
This is the updated fiddle:http://jsfiddle.net/qvco2Ljy/122/