I've enhanced a force diagram to compare two profiles. I am trying to have the main node take on an image
http://jsfiddle.net/LsMZp/5/
- how do I get the image to be centrally aligned (sized correctly) and the thumbnail data passed in more dynamically from the json string.
- also if someone shares a particular interest - is there a better way of handling it - if the information is duplicated a link is formed but a nomad node remains left and unlinked.
- also is there a way to provide a stir of motion in the application, so it doesn't ever completely settle
https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSTzjaQlkAJswpiRZByvgsb3CVrfNNLLwjFHMrkZ_bzdPOWdxDE2Q - this is the image I'm using as a mock.
var circle = svg.append("svg:g")
.selectAll("circle")
.data(force.nodes())
.enter()
.append("svg:circle").attr("r", function(d) {
return getRadius(d);
}).style("fill", function(d) {
if(d.group == "User"){
return "url(#img1)";
}else{
return color(d.group);
}
}).call(force.drag);
if (options.nodeLabel) {
circle.append("title").text(function(d) {
return d[options.nodeLabel];
});
}
if (options.linkName) {
path.append("title").text(function(d) {
return d[options.linkName];
});
}