You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When rendering the graph and giving nodes initial positions via x/y, if a node does not have any links it will not be properly placed in the graph.
Describe the bug
When rendering the graph and giving nodes initial positions via
x
/y
, if a node does not have any links it will not be properly placed in the graph.To Reproduce
Here's a minimal repo:
I also have this in a code sandbox: https://codesandbox.io/s/create-react-app-7ozk6?file=/src/App.js
You'll notice that
node-1
andnode-2
are placed properly, butnode-3
is placed at0,0
.Adding i.e.
{ source: "node-2", target: "node-3" }
to thelinks
array will causenode-3
to be properly placed.Expected behavior
Nodes that have
x
/y
coordinates should always be placed in the right spot when rendering even if they don't have links.Screenshots
Without links:
With links:
Environment:
react-d3-graph
The text was updated successfully, but these errors were encountered: