How to make a tree org chart like in process on?

Now I learn from this site: Org Chart Extras, and only got a chart like this:

But can you give a detail demo about how to make a Tree org chart like bellow?

Ignoring the “extra” links in that sample, Org Chart Extras (, if you look at how that sample is implemented you will notice what it assigns to Diagram.layout:

                  treeStyle: go.TreeLayout.StyleLastParents,
                  arrangement: go.TreeLayout.ArrangementHorizontal,
                  // properties for most of the tree:
                  angle: 90,
                  layerSpacing: 35,
                  // properties for the "last parents":
                  alternateAngle: 0,
                  alternateLayerSpacing: 35,
                  alternateAlignment: go.TreeLayout.AlignmentStart,
                  alternateNodeIndent: 10,
                  alternateNodeIndentPastParent: 1.0,
                  alternateNodeSpacing: 10,
                  alternateLayerSpacing: 30,
                  alternateLayerSpacingParentOverlap: 1.0,
                  alternatePortSpot: new go.Spot(0.01, 1, 10, 0),
                  alternateChildPortSpot: go.Spot.Left

That is what arranges the nodes to be like this:

The appearance and behavior of the nodes depends on the node template, of course. And the appearance (and routing) and behavior of the links depends on the link template.