Specify nested rectangles to be created in vertical order

0 votes
asked Apr 6, 2018 in Question / help by kaushalmodi (260 points)
edited Apr 6, 2018 by kaushalmodi
commented Apr 6, 2018 by kaushalmodi (260 points)
edited Apr 6, 2018 by kaushalmodi
It would be even better if there's a way to specify all the nested rectangles to have the exact same width, regardless of the content in those.

Eventually, if possible, I'd like the nested rectangles to show up like this: https://i.imgur.com/IhuXs9F.jpg

1 Answer

+1 vote
answered Apr 9, 2018 by plantuml (295,000 points)

You can use

@startuml
rectangle a {
  rectangle b
  rectangle c
  rectangle d
  b -[hidden]-> c
  c -[hidden]-> d
}
@enduml

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuIfAJIv9p4lFILL8LAZcKb10y9DGUCael1GWBqb1DpeZCoKbDIzMrmuidumi0bHJo-MGcfS2j0K0

But this is really a hack, and you should not abuse of hidden arrows.

...