Using a layeredDigraphLayout and groups at the second layer use the TreeLayout
My problem is vertical layout. With all sub nodes collapsed, it lines up beautifully but with the sub trees expanded
The sub nodes are aligning centrally.
Main layout is this:
myDiagram = $(go.Diagram, "myDiagramDiv", // must be the ID or reference to div
{
autoScale : go.Diagram.Uniform,
layout: $(go.LayeredDigraphLayout,{
direction:90, //horizontal
layeringOption:go.LayeredDigraphLayout.LayerLongestPathSink,
})
});
Groups is this:
myDiagram.groupTemplate =
$(go.Group, "Auto",
{ // define the group's internal layout
layout: $(go.TreeLayout,
{ angle: 90, nodeSpacing: 10, layerSpacing: 40, layerStyle: go.TreeLayout.LayerUniform })
,
// the group begins unexpanded;
// upon expansion, a Diagram Listener will generate contents for the group
isSubGraphExpanded: true,