Sunday, 3 September 2023

Force Layout in PlantUML Diagrams with Hidden Links

‘hidden’ links can be used to force the layout.

For example, without hidden links.

 

withoutHiddenLinks.txt

@startuml

together {
	interface Appendable
	interface Cloneable

        class System
}

together {
	interface Collection<E>
	interface List<E>

	class ArrayList<E> implements List
}

@enduml

 

Above snippet generate below diagram.

  


withHiddenLinks.txt

@startuml

together {
	interface Appendable
	interface Cloneable

        class System
}

together {
	interface Collection<E>
	interface List<E>

	class ArrayList<E> implements List
}

Appendable -[hidden]--> Collection
Cloneable -[hidden]--> ArrayList

@enduml

 

Above snippet generate below diagram.


 

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment