3d-force-graph
3d-force-graph copied to clipboard
Node border
I have a problem where, if Im creating a new node that isn't linked to anything and i render it in the graph that already has a lot of connections ,then the node gets sent somewhere really far away, because of how the force graph works, and it becomes harder to locate the node.
how can i create like a spherical bounding box to keep the nodes contained, so they don't go flying out into space?
here's a picture depicting what I would like to accomplish:
@atlllas thanks for reaching out.
You could add an additional force: d3-force-limit that prevents nodes from exiting a given sized container.
In that force plugin the container is cubical not spherical, but maybe that suits your case. If not, you can use the same principle to build a spherical container custom force.