Arbitary diagrams may have much more complicated relationsihps than can be supported through HierarchicalDataTemplates. GoXam defines the node relationships based on the kind of Model that you use and the node/link relationships defined in those models.
Regarding Layout, GoXam supports several different layout algorithms, including tree layout.
You should probably start by looking at the “Decision Tree” sample application. This sample demonstrates expanding and collapsing a tree of nodes, and laying out that tree using TreeLayout. You might also want to look at the “Tree Layout” sample application to get a better understanding of the layout options available to you under TreeLayout.