elk icon indicating copy to clipboard operation
elk copied to clipboard

Layered: Unexpected disregard of aspect ratio/direction of unconnected subnodes when INCLUDE_CHILDREN is set

Open nklsbckmnn opened this issue 3 years ago • 6 comments

In this example, I would expect the subnodes of n2 to be stacked on top of each other even though there is no edge between them.

nklsbckmnn avatar Aug 03 '21 09:08 nklsbckmnn

I believe due to cross-hierarchy edge handling it's not possible to influence the aspect ratio on the inside.

uruuru avatar Aug 03 '21 16:08 uruuru

Thank you for the reply. Is there any other way to have the subnodes arranged vertically in such a case? Partitions don't seem to work.

nklsbckmnn avatar Aug 03 '21 18:08 nklsbckmnn

Minimal example:

hierarchyHandling: "INCLUDE_CHILDREN"
elk.direction: DOWN
aspectRatio: 0.1
node n1
node n2

nklsbckmnn avatar Aug 09 '21 19:08 nklsbckmnn

Partitioning works for children of the root node, but not for their children:

hierarchyHandling: "INCLUDE_CHILDREN"
elk.direction: DOWN
aspectRatio: 0.1
partitioning.activate: true
node n0
{
    partitioning.activate: true
    partitioning.partition: 1
    node n1
    {
        partitioning.partition: 2
    }
    node n2
    {
        partitioning.partition: 3
    }
}

node n1
{
    partitioning.partition: 4
}

nklsbckmnn avatar Aug 09 '21 19:08 nklsbckmnn

Do you plan to only layout nodes without any edges? If this is the case I would try out the box or rectpacking algorithms.

soerendomroes avatar Mar 21 '22 15:03 soerendomroes

Thanks for the suggestion. They can sometimes have edges like in the first example unfortunately...

nklsbckmnn avatar Mar 21 '22 15:03 nklsbckmnn