Position and size alignment of packages in component diagram

0 votes
asked May 2 in Wanted features by ANS

First of all: PlantUML is a great tool. I would also like to use it to create some software architecture overview using a component diagram.
However I'm facing the problem that the layout is not looking very well. I can control it in a limited way using hidden connections but I would like to have the packages and rectangles having the same size and position.
Consider the following example:

@startuml
package Package1 {

  package 1A {

    rectangle "Short" as rs {     
    }

    rectangle "Long long text" as rl {     
    }

    rs -[hidden]d-> rl
  }

  package 1B {

    rectangle "Foo" {     
    }   
  }

  1A -[hidden]-> 1B
}

package Package2 {

  package 2A {

    rectangle "Bar" {
    }
  } 
}

package Package3 {
}

Package1 -[hidden]> Package2
Package2 -[hidden]> Package3
@enduml

This results in:

What I would like to have is something like this:

Would it be possible to add a possibility to provide more layout information, e.g. the height of Package2 is at least the height of Package1? Same applies to width, vertical position etc.

1 Answer

0 votes
answered May 2 by plantuml (160,200 points)
Unfortunately we are facing some GraphViz limits here. I don't think we can achieve your example using Dot/GraphViz. Sorry about that.

The only think we could try is to use or create another layout engine. In your example, there are no link/edge. Is this because you've posted a simplified diagram ?
commented May 3 by anonymous
edited May 9
Thanks for the quick reply. So is there an option to use a different layout engine and what engine would that be?
The example has intentionally no relations (if that is meant by 'link') because it shall be used to provide a high level overview over the software architecture (packages and components but not the relations between them).
...