title: How to layout a non-tree hierarchy with D3
body: <p>D3 has a variety of layouts for directed graphs that are strict trees, such as the following:</p>
  
  <pre><code>A
  |\
  B C
   / \
  D   E
  </code></pre>
  
  <p>I need to draw a hierarchy of nodes that is not a tree, but is a directed acyclic graph.  This is a problem for a tree layout, because several of the branches converge:</p>
  
  <pre><code>A
  |\
  B C
   \|
    D
  </code></pre>
  
  <p>Does anyone know of a D3 layout for general hierarchies?  Or alternatively, some clever hack to the existing treelayout?  I've noticed GraphVis handles this situation well, but D3 produces a graph that better suits the requirements here.</p>