I created this diagram using the following code. But as you can see, the lines going from (Cancel Order) and (Place Order) to (Publisher) decide to take a terribly rounded p
If anyone wants to know a more specific, put probably much more useless answer, here is what I did in the end.
order -down- publisher
publisher -[hidden]up- order
so for some reason adding the duplicated command both ways solves it.
To make a connection less important in the layout, use [norank]
, e.g., a -[norank]-> b
Try the options suggested by @Peter Uhnak along with linetype :
skinparam linetype polyline
skinparam linetype ortho
Give better options for lines. Using ortho - (Here)
you will get -
There are some tricks that you can try, listed below. The layouting itself is performed by GraphViz (dot layouting iirc), and GraphViz simply does this sometimes. Graph layouting is a NP-complete problem, so algorithms usually take harsh shortcuts.
Typical workarounds that I've seen or used include:
a -[hidden]- b
a --- b
(more dashes, longer line)a -left- b
)a -- b
→ b -- a
)So if you really want to have a nice layout, you'll need to put some elbow grease in, but keep in mind that the layout will be still brittle -- if you add/remove items, you might need to redo it again.