Here are some other tricks, if you've already tried hidden lines, for fixing layout issues. Your mileage may vary...
Let's assume we want Box 1 on the left. We used the 'right' tag, however this isn't working:
@startuml
skinparam monochrome true
skinparam handwritten true
title Wrong layout
rectangle "Grouping" {
rectangle "Box 1" {
rectangle "Apples"
}
rectangle "Box 2" {
rectangle "Pears"
}
}
Apples -right-> Pears
@enduml
A fix is to reverse the order of the components in the code:
@startuml
skinparam monochrome true
skinparam handwritten true
title Layout fixed by Changing Component Order
rectangle "Grouping" {
rectangle "Box 2" {
rectangle "Pears"
}
rectangle "Box 1" {
rectangle "Apples"
}
}
Apples -right-> Pears
@enduml
TBD
@startuml
left to right direction
TBD
@startuml
together {
rectangle "Box 1" as box_1
rectangle "Box 2" as box_2
}
Can try extending lengths of lines by adding dashes, examples starting with normal length lines:
@startuml
title Ugly Layout
skinparam monochrome true
component [component 1] as myComponent
component [component 2] as myComponent2
component [component 3] as myComponent3
component [component 4] as myComponent4
myComponent -> myComponent2
myComponent2 -> myComponent3
myComponent2 -> myComponent4
myComponent -> myComponent4
@enduml
Add dashes to lines to make them longer to change layout:
@startuml
title Possibly Better Layout
skinparam monochrome true
component [component 1] as myComponent
component [component 2] as myComponent2
component [component 3] as myComponent3
component [component 4] as myComponent4
myComponent -> myComponent2
myComponent2 ----> myComponent3
myComponent2 ---> myComponent4
myComponent -> myComponent4
@enduml
TBD, see https://stackoverflow.com/questions/48712801/how-to-correct-plantuml-line-path/61795202#61795202
TBD, see https://stackoverflow.com/questions/48712801/how-to-correct-plantuml-line-path/48735216#48735216
TBD, see https://stackoverflow.com/questions/48712801/how-to-correct-plantuml-line-path/48735216#48735216