Reputation: 1078
I'm trying to plot this component diagram with plantuml
@startuml
skinparam linetype ortho
left to right direction
folder BASE {
folder foo {
component aaa
}
folder bar {
component bbb
folder ENV {
artifact ccc <<config>>
artifact ddd <<db>>
}
}
}
folder lorem {
folder ipsum {
component eee
component fff
component ggg
}
folder amet {
component panel <<jar>>
}
folder dolor {
artifact hhh <<config>>
}
}
folder fox {
folder jumps {
artifact jjj <<document>>
artifact kkk <<document>>
artifact mmm<<document>>
}
folder lazy {
artifact context.txt
}
}
aaa --> context.txt : write
aaa --> bbb : launch
bbb --> hhh : read
bbb --> panel : launch
panel --> ccc : read
panel --> ddd : read
panel --> eee : run
panel --> fff : run
panel --> ggg : run
panel --> kkk : write
eee --> jjj : read
eee --> mmm: write
ggg --> jjj : write
ggg --> mmm: read
@enduml
the result is a bit messy: arrows overlapping and text on arrows difficult to read
Is there a way to better control arrows and text disposition? (for example something for minimizing arrow intersections and having text closer to the corresponding arrow)
Upvotes: 7
Views: 11042
Reputation: 12882
When a diagram is complex, it can be a nondeterministic struggle to make it more readable. Some suggestions:
skinparam ArrowThickness 3
or change the font for the text on the arrows to bold in a similar way.skinparam linetype polyline
panel --> eee : run
use panel "run" --> eee
(for the name at the start) or panel --> "run" eee
(for the name at the end)together {...}
(it's like a hidden rectangle, and will perhaps add more space).left to right direction
instruction (with a comment).Here are a few of things applied to your diagram, but it could be better:
@startuml
skinparam linetype polyline
'left to right direction
skinparam Arrow {
MessageAlignment left
Thickness 3
FontStyle Bold
Color Blue
}
folder BASE {
folder foo {
component aaa
}
folder bar {
component bbb
folder ENV {
artifact ccc <<config>>
artifact ddd <<db>>
}
}
}
folder lorem {
folder ipsum {
component eee
component fff
component ggg
}
folder amet {
component panel <<jar>>
}
folder dolor {
artifact hhh <<config>>
}
}
folder fox {
folder jumps {
artifact jjj <<document>>
artifact kkk <<document>>
artifact mmm<<document>>
}
folder lazy {
artifact context.txt
}
}
aaa --> "write" context.txt
aaa --> "launch" bbb
bbb --> "read" hhh
bbb --> panel : launch
panel --> ccc : read
panel --> ddd : read
panel --> eee : run
panel --> fff : run
panel --> ggg : run
panel --> kkk : write
eee --> jjj : read
eee --> mmm: write
ggg --> jjj : write
ggg --> mmm: read
@enduml
Upvotes: 4