Sunday 15 January 2023

PlantUML: Customize arrow style in a sequence diagram

Arrow style can be customized in various ways. Find the below examples.

 

1.   add a final x to denote a lost message

2.   use \ or / instead of < or > to have only the bottom or top part of the arrow

3.   repeat the arrow head (for example, >> or //) head to have a thin drawing

4.   use -- instead of - to have a dotted arrow

5.   add a final ”o” at arrow head

6.   use bidirectional arrow <->

 

customizeArrowStyle.txt

@startuml

skinparam responseMessageBelowArrow true

p1 ->x p2: I denote a lost message
p1 -/ p2: Denote bottom part of the arrow
p1 -\ p2: Denote top part of the arrow
p1 ->> p2: Repeat or thin drawing
p1 -// p2: thin drawing the bottom part
p1 -\\ p2: thin drawing the top part
p1 --> p2: Dotted arrow
p1 ->o p2: Add a o to arrow head
p1 <->: bidirectional arrow
p1 -> p2: Normal arrow

@enduml

 


 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment