I have some nodes and links and am drawing a graph, I successfully draw the following graph,
I want to change the connections from G to D and from E to C like the second screenshot with the red lines.
some code
// the diagonal link generator
diagonal = d3
.linkHorizontal()
.x(d => d.x)
.y(d => d.y);
// and its usage (generating the d parameter)
...
.attr("d", d3.linkHorizontal().x(d => d.x).y(d => d.y));
...
I tried to implement this using the .linkRadial()
, but without any luck, all I could manage is make the curvature bigger
- I can submit more code if needed, the reason am not is because its mostly the basic d3 tree structure, and am doing some overwrites to implement the logic of drawing the tree with a "to-top" like effect so each branch is in one horizontal line
Edit:
Managed to achieve this almost using the .linkVertical()
for those links instead, but now I need the curves to be bigger so its more obvious. Reading the documentation I cant find any way to edit this..