user1517566
user1517566

Reputation: 356

Graphviz forcing nodes to stack vertically despite rankdir=LR

I am new to Graphviz and trying to layout some nodes from left to right with something like the following:

digraph g {
graph [ rankdir = "LR" ]; 
node [ fontsize = "16",  fontname="Arial" ]; 
nodesep = 1.0; 
ranksep = 4.0; 

"node0" [ 
label = "<f0>OBJECT0| <f1> Id | <f2> Name" 
shape = "record"  ];

"node1" [ 
label = "<f0>OBJECT1| <f1> Id | <f2> Name"
shape = "record"  ];
"node2" [ 
label = "<f0>OBJECT2| <f1> Id | <f2> Name"
shape = "record"  ];    

"node4" [ 
label = "<f0>OBJECT3| <f1> Id | <f2> Name"
shape = "record"  ];    
** I also have some connectors in here across the nodes **
}

This works ok for very basic nodes, but if I have say 100 rows within a node (representing a database table and fields) the nodes are stacked vertically and nothing I do seems to influence the damn things to revert back to a horizontal layout.

Any suggestions on how I might force the issue would be most appreciated - this one has me completely stuck!

Cheers CH

Upvotes: 3

Views: 1060

Answers (1)

user1517566
user1517566

Reputation: 356

Resolved - needed to add the line node0 -> node1 -> node2 -> node3 -> node4 [style=invis]

Upvotes: 2

Related Questions