New to D3 and the documentation isn't so strong so I'm just going of examples, but it is taking too much time. I found a great jsfiddle (found in this post) using d3 to transition between different embeddings for a network graph. I want to give the graphs straight lines instead of curved lines, and have done so for the tree embedding, but I have no idea how to apply it to the radial cluster option.
This is the code I added to replace 'diagonal()' in the tree representation to give straight lines instead of curved, not sure how to modify it for radialCluster
var line = d3.svg.line()
.x( d => d.lx )
.y( d => d.ly );
function lineData(d){
var points = [
{lx: d.source.y, ly: d.source.x},
{lx: d.target.y, ly: d.target.x}
];
return line(points);
}
Any help would be greatly appreciated :)
ps. Why isn't there a way to just transform the location of the nodes (e.g. to form radial cluster) and then use that data simply draw the relations?