Arrange: automatic layout of a Neo4j graph data model
Click Arrange in the side panel, under Add node and Add note, for a layout with as few crossing relationships as possible and your most connected nodes in the middle. Arrange also clears notes and relationship types out of the way.
How it decides
toro4n places the nodes on a grid and looks for the layout with the fewest crossing relationships, then the fewest relationships running over another node, then the shortest relationships, with the nodes that have the most relationships closest to the center. Fewer crossings always come first, so a node never moves toward the center if that would add a crossing. Your current layout is always one of the candidates, so Arrange never replaces a good layout with a worse one. The same model always gives the same result. Then Arrange tightens the layout: each node moves toward its neighbors, and the most connected ones toward the center, as long as no new crossings appear and the nodes keep enough room between them. The nodes glide into place. A single undo puts everything back.
Which nodes move
Select two or more nodes to arrange just those. Otherwise, Arrange moves every visible, unlocked node. Other nodes stay where they are, and Arrange places the new layout in the nearest open space around them. A note attached to a single node moves with that node. A note attached to a relationship, or to several nodes and relationships, moves with the midpoint of what it's attached to.
Notes and relationship types
After placing the nodes, Arrange moves relationship types and notes out of the way. A relationship type slides along its line, together with its properties, to the clear spot closest to the middle, never too near either end. A note moves the shortest distance to a clear spot. Arrange treats the note's dashed link like a relationship: it looks for a spot where the link doesn't cross other lines or pass under a node, note, or relationship type, and where no line passes under the note. Relationship types and notes that are already clear stay put, including a relationship type you've dragged along its line.
Room between nodes
Arrange leaves room for each node's labels, properties, and self-loops, and for any notes attached only to that node. Connected nodes end up at least 300 px apart, and always far enough apart for the relationship type and its properties to fit between them. Nodes that aren't connected stay at least 180 px apart.
When Arrange leaves your layout alone
Arrange moves nodes only when that removes crossings, separates overlapping nodes, makes room for a relationship type, spaces out nodes that are too close together, makes a spread-out layout noticeably more compact, or brings the most connected nodes noticeably closer to the center. It never adds crossings. If none of that applies, the nodes stay put, so clicking Arrange a second time leaves an arranged layout alone. Relationship types and notes that are in the way still move. If nothing needs to move at all, a message tells you why.
Arrange for export
Before you export an image, click Arrange for export, next to Arrange. It arranges the whole model the way Arrange does, then keeps spacing things out until no node, label, property list, relationship type, or note covers another. A node that a relationship runs behind moves off that line, and when a relationship type doesn't fit between its nodes, those nodes move apart to make room. It applies to every visible, unlocked node, whatever is selected; locked nodes stay put and everything else keeps clear of them. A single undo puts everything back.
Placing new nodes
When an AI assistant draws or extends a model, or you import the schema of a Neo4j database, toro4n places each new node next to the nodes it connects to, with room for the relationship type. An assistant never moves nodes you've placed unless you ask it to arrange the model.