elk
elk copied to clipboard
Can elk set the alignment of some components
This is a sample graph.

The red boxes in the picture are aligned vertically.
How to set it?
I'm not sure I understand the question. Do you like it this way and want to know how to force the same kind of alignment in other diagrams? Do you not like it this way and are looking for a way to change it?
I want to get a way to align the nodes of the same type vertically
If it just concerns moving those nodes to the left or to the right of the diagram, the layer constraint option might be what you're looking for.
If you're looking for a more general solution, I'm afraid there is none. What you can try is to turn partitioning on and assign the same partition to the nodes that should be vertically align, but you'll have to assign partitions to all other nodes as well, which might not be what you want.
Another solution could be to wrap nodes that should be grouped into a subgraph, but that comes with its own layout problems.