How to increase spacing between arrows

+1 vote
asked Jan 2 in Question / help by Jango

Hello All,

I creating a deployment diagram. As there are many connections, the arrows are very cluttered. Is there any ways to increasing the spacing between the arrows ? Please see the below image .

https://imgur.com/a/9eQoRXL

1 Answer

0 votes
answered Mar 21 by The-Lu (48,920 points)

Hello J.,

Here are some tests...

Compare:

Code Ourput
@startuml
skinparam linetype ortho

node Test1 
node Test3

frame f {
component C {
  node 3V
}
node Test2
}

2V - 3V

Test1 --> Test2
Test1 --> Test2
Test1 --> Test2
Test3 --> Test2
Test3 --> Test2
Test3 --> Test2
Test3 --> Test2
@enduml
@startuml
skinparam linetype ortho

node Test1 
node Test3

frame f {
component C {
  node 3V
}
node Test2
}

'2V - 3V

Test1 --> Test2
Test1 --> Test2
Test1 --> Test2
Test3 --> Test2
Test3 --> Test2
Test3 --> Test2
Test3 --> Test2
@enduml

Then if you want ortho-line, perhaps use the elk layout, as:

@startuml
!pragma layout elk

node Test1 
node Test3

frame f {
component C {
  node 3V
}
node Test2
}

2V -- 3V

Test1 --> Test2
Test1 --> Test2
Test1 --> Test2
Test3 --> Test2
Test3 --> Test2
Test3 --> Test2
Test3 --> Test2
@enduml

See doc. here:

If that can help,
Regards.

commented Mar 24 by boldandbusted (260 points)
The elk layout here looks very nice and orderly. I took a stab at trying out the ELK layout engine with the instructions here, but since I install PlantUML with Homebrew, it seems that I can't really get it to work properly. Any word on if ELK will become part of plantuml.jar anytime soon? :)
commented Mar 24 by Martin (8,320 points)

One workaround for the arrows into Test2 would be to make the Test2 box taller using carriage returns, like this:

node "\n\nTest2\n\n" as Test2

I've got no similar idea for helping the arrows exiting Test1.

...