Monday 21 August 2023

How to Customize Arrow Direction in PlantUML Class Diagrams?

You can customize the arrow direction using left, right, up, down keywords.

arrowDirection.txt

@startuml

Human -left-> Brain
Human -right-> Lungs
Human -up-> Liver
Human -down-> Heart

@enduml

Above snippet generate below diagram.

 


By default, PlantUML build the diagrams from top to bottom, let’s changes this alignment to ‘left to right’ and see what happens.

 

leftToRightAlignment.txt

@startuml

left to right direction

Human -left-> Brain
Human -right-> Lungs
Human -up-> Liver
Human -down-> Heart

@enduml

Above snippet generate below diagram.




  

Previous                                                    Next                                                    Home

No comments:

Post a Comment