Re:Sigma.js, a JavaScript library dedicated to graph drawing
by davidjgraph on Tuesday February 04, 2014 @05:56PM
(#7180824)
Also commercial with digraph layout functionality:
http://www.tensegrity-software.com/category/javascript-html5...
Here's an overview of the options for the layered digraph layout: http://www.gojs.net/latest/samples/ldLayout.html
The tree layout supports some fairly complicated tree structures, including ones that alternate or have different configurations for leaves: http://www.gojs.net/latest/samples/tLayout.html
Disclosure: I'm a developer of this library and it is not free.