Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

How do I do a directory tree, top-left to bottom-right

0 votes
I'd like to layout my nodes like a file directory tree:

 - root (level 0) node is the top-left node

 - level 1 nodes are below the root node, slighlty on its right

 - level 2 nodes are below their parent node, slightly on its right, etc.

The closest I found is the BPMN layout. I get the root node at the top but on the same horizontal line as its first child node. I'd like the first child node to be slightly below (actually a bit more that the vertical size of the edges).

How do I get that layout?
in Help by

1 Answer

0 votes
You can achieve this in two steps. First is a 'Tree Layout' with 'Layout Style' 'Horizontal-Vertical'. This creates almost the desired layout but in horizontal orientation. To change this into the typical vertical directory tree orientation, you can use the tool 'Geometric Transformations' and do a rotation by 90 degree followed by mirroring on the y-axis.
by [yWorks] (26.8k points)
Excellent answer! It does exactly what I wanted and it clearly explains the geometric transformations feature that I had'nt used before. Thanks a lot!
Actually, I experimented with the layout a bit more and found out that you may get mixed branch directions like in this example: http://docs.yworks.com/yfiles/doc/api/y/layout/tree/HVTreeLayouter.html

I don't think that there is a way to prevent this in yEd.
Legal Disclosure | Privacy Policy
...