Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A little late, I know, but I just wanted to show an other version without having to figure out the exact positions of each node.</p> <pre><code>digraph { splines=false; ranksep=0.05; node[shape=box, color=lightblue, style=filled]; A;B;C;D;E; node[shape=none, color=none, style=solid]; i1[label="Item 1"]; i2[label="Item 2"]; i3[label="Item 3"]; node[label="", width=0, height=0]; edge[arrowhead=none, color=blue]; {rank=same; n2; n1; n3;} n2; n1; n3; A -&gt; n1; n2 -&gt; n1 -&gt; n3; {rank=same; B; C;} n2 -&gt; B; n3 -&gt; C; {rank=same; n4; D;} B -&gt; n4 -&gt; D; {rank=same; n6; n5; i1;} D -&gt; n5 -&gt; i1; n4 -&gt; n6; {rank=same; n7; E;} n6 -&gt; n7 -&gt; E; {rank=same; n8; i2;} E -&gt; n8 -&gt; i2; {rank=same; n9; i3;} i2 -&gt; n9 -&gt; i3; } </code></pre> <p>Straight lines are enforced by:</p> <ul> <li><code>splines=false</code> - say no to splines</li> <li>invisible nodes (nodes n1, n2,... n9)</li> <li>placing nodes on the same rank with <code>rank=same</code></li> </ul> <p>It's still some work to get the dot file right, but it beats imho calculating yourself the position of each node.</p> <p>Output looks like this:</p> <p><img src="https://i.stack.imgur.com/RmNYs.png" alt="graphviz output"></p> <p>As long as C has no child nodes, you'd have to apply some more trickery (invisible nodes) to display it all the way to the right.</p> <p>In order to get a more general solution for different graphs, some further adaptations will probably be needed (apply weight to vertical edges, or group nodes which have to be vertically aligned, or use subgraphs, ...).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload