TreeView Type Layout


#1

How can i have nodes and links layed out in a treeview type of look
I’ve looked at the layered diagraph and force directed layouts but come seem to get the right setting to get that type og layout.


#2

The layered digraph autolayout is what you want to use. Is what you find missing in the look the positioning of the parent relative to the children?
In other words, you don’t want the standard behavior of putting the parent somewhat centered about its children. Instead do you want the parent to be shifted completely off to the size of its children?


#3

I always get the parent centered above its children.I want the Parent to be at the top left and the children of each parent to be at least 50 pixels on the Y-axis and 50 pixels on the X-axis away.If the level does not change the children should be positioned at least 50 pixels on the Y-axis only.
I don’t know if this is clear enough


#4

If you really have a tree, rather than a graph that has two (or more) parents for any one child, then it’s probably easiest to code this positioning yourself. You just do a tree-walk, incrementing the Y position for each node, incrementing the X position when recursing to the children, and decrementing the X position afterwards.
Maybe we should change the TreeApp sample to have this kind of layout as an option.


#5

So we are on the same page, I have already opted for that resolution.
Thanx a lot for your help and time.