How do I increase the length of edges between nodes? #3743
-
Beta Was this translation helpful? Give feedback.
Answered by
Fil
Aug 1, 2023
Replies: 1 comment 3 replies
-
This is what I have currently. This code might be relevant. // Function to update node positions
function ticked() {
links
.attr('x1', (d: any) => d.source.x)
.attr('y1', (d: any) => d.source.y)
.attr('x2', (d: any) => d.target.x)
.attr('y2', (d: any) => d.target.y);
// Without this line, nodes don't have labels.
nodeLabels.attr('x', (d) => d.x!).attr('y', (d) => d.y!);
// Without this line, nodes don't have a colored circle.
nodesSelection.attr('cx', (d) => d.x!).attr('cy', (d) => d.y!);
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
maybe try https://d3js.org/d3-force/link#link_distance