More space between the parents node in Mind Map diagram

Hey there,

I am trying to tackle a issue related to the aesthetics of mind map diagram. Basically, I am trying to add more space between the 2nd level parents so their child nodes are easily distinguishable. Check out the picture to see what I am trying to achieve.

I have tried bunch of things, but no success so far. I know the space between the nodes is controlled by the NodeSpacing attribute in treeLayout, but that obvisouly increases space between all nodes. Possible solution could be to add extra space to the calculated space of the parent node, but I am unsure how to achieve that. Is there any other way this is achievable?


There are two sets of properties that are easy to apply to the TreeVertexes of a TreeLayout. The regular properties and those whose names start with “alternate…”. The value of TreeLayout.treeStyle determines when the alternate properties apply.

In your case, it’s just a matter of setting these properties on the TreeLayout:

  function layoutAngle(parts, angle) {
    var layout = go.GraphObject.make(go.TreeLayout,
          arrangement: go.TreeLayout.ArrangementFixedRoots,
          treeStyle: go.TreeLayout.StyleRootOnly,
          angle: angle,     // these properties apply only at the root vertex
          nodeSpacing: 25,
          layerSpacing: 20,
          alternateAngle: angle,  // these properties apply to all other vertexes
          alternateNodeSpacing: 5,
          alternateLayerSpacing: 20

Of course you can fiddle with the exact numbers, along with other properties too.

Thank you very much that was nice and easy. I,m glad to see that it was already thought out and implemented in the framework. Works perfectly.