Open MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM opened 2 months ago
You could approach this in multiple ways, if you want to achieve such a layout. If your graph is completely acyclical you could take advantage of the built-in DAG layout mode, via .dagMode('lr')
. Just make sure the direction of your links follow a left-to-right orientation in your graph data. Here's an example using the DAG mode: https://vasturiano.github.io/force-graph/example/tree/
Alternatively, you could use an additional clustering force, like d3-force-cluster, to group your nodes into meaningful spatial clusters.
Hello, I would like to group and display nodes based on the type of the link. For example, a link with type 1 will display nodes on the left, and a link with type 0 will display nodes on the right. May I know which attribute value should I use to set the node partition to display together? I hope to receive your answer![1716187218335](https://github.com/vasturiano/force-graph/assets/33676254/12897de5-85c3-4f1e-aab0-4adb1696e37a)