Tuesday 2 May 2023

PlantUML: Customize arrow direction in use case diagram

 -> : Generate horizontal link between the objects.

-->: two dashes or more generate vertical link between the objects.

 

arrowDirection.txt

@startuml

actor user

usecase "use case 1" as UC1
usecase "use case 2" as UC2

user -> (UC1)
user --> (UC2)

@enduml

Above snippet generate below diagram.



We can change the arrow direction by adding left, right, up or down keywords.

 

arrowDirection2.txt

@startuml

actor user

usecase "use case 1" as UC1
usecase "use case 2" as UC2
usecase "use case 3" as UC3
usecase "use case 4" as UC4

user -left-> (UC1)
user -right-> (UC2)
user -up-> (UC3)
user -down-> (UC4)

@enduml

Above snippet generate below diagram.



 

Previous                                                    Next                                                    Home

No comments:

Post a Comment