How do I center the description of a state diagram?

0 votes
asked Jan 2, 2024 in Question / help by jack41402 (160 points)

I make a state diagram like this, but the description is always aligned left.

However, I want it to always align center, but I can't find a way to do so, even though I have tried `TextAlignment` and `defaultMessageAlignment`.

@startuml
skinparam RoundCorner 100
skinparam TextAlignment center
skinparam defaultMessageAlignment center

state "000" as S0 #99EBFF: 00
state "001" as S1 #FFFF99: 00
state "010" as S2 #FFFF99: 00
state "011" as S3 #ADDB7B: 10
state "100" as S4 #FF6699: 01

S0 -> S1: password[2]
S1 -> S2: password[1]
S2 -> S3: password[0]
S3 -> S3: d

S0 --> S4: !password[2]
S1 --> S4: !password[1]
S2 --> S4: !password[0]
S4 --> S4: d
@enduml

1 Answer

0 votes
answered Oct 23, 2024 by The-Lu (87,240 points)
...