Is it possible to define a min hight/width of a person?

0 votes
asked Jun 28, 2022 in Question / help by kirchsth (5,080 points)

I want to use different persons with different descriptions, and all should have a similar width and minimal height that they look more aligned in my C4-PlantUML diagrams.

How can I define it?

Atm all have very different sizes

@startuml
skinparam wrapWidth 200
skinparam maxMessageSize 150

hide stereotype
skinparam defaultTextAlignment center

skinparam person<<person>> {
    StereotypeFontColor #FFFFFF
    FontColor #FFFFFF
    BackgroundColor #2222CC
}

person "==P0\n\n LONG LONG LONG LONG LONG Description" <<person>> as P0
person "==P1\n\n Description" <<person>> as P1
person "==P2" <<person>> as P2
@enduml


Thank you and best regards
Helmut

PS.: I know I can add line breaks and spaces, but this I want to avoid

commented Jan 18, 2023 by kirchsth (5,080 points)

based on https://forum.plantuml.net/17215/allow-maximumwidth-and-minimumwidth-all-styles-for-diagrams it is possible to define the width limits only the height remains open

@startuml
<style>
person {
  MinimumWidth 300  ' new implemented
  MinimumHeight 150 ' missing atm
}
</style>

skinparam wrapWidth 200
skinparam maxMessageSize 150
skinparam defaultTextAlignment center

    skinparam person<<person>> {
        StereotypeFontColor #FFFFFF
        FontColor #FFFFFF
        BackgroundColor #2222CC
    }

    person "==P0\n\n LONG LONG LONG LONG LONG Description" <<person>> as P0
    person "==P1\n\n Description" <<person>> as P1
    person "==P2" <<person>> as P2
@enduml

 

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...