How to avoid cluttering of diagram with many connections and labels

0 votes
asked Oct 26, 2022 in Question / help by Raphael
Dear community,

after long searching the internet for information and not finding anything that can help address my issue, I resort to asking it here in this forum.

Currently I have a tool which generates PlantUML models for eclipse projects. At the moment, even simple diagrams which contain many connections get cluttered.

I would really appreciate if anyone can provide some hints to how this issue can be addressed. I thought about: padding, rotating connector labels, automatically increasing the size of the elements (e.g. node) to allow for more space between connectors, etc. Nevertheless, I have not found which parameters I can set so that this information is forwarded to graphviz or related elements in the architecture.

Here is one example model which leads to the issues I have:

-------- cut here ---------

@startuml
left to right direction
skinparam linetype ortho
skinparam nodesep 150
skinparam ranksep 150

node LongerNamedElementCalledC3 #aliceblue [
 "Longer Named Element Called [C-3]"
]
node ShortC1 #aliceblue [
 "Short [C-1]"
]
node ASomeHowLongerNameC2 #aliceblue [
 "A Some How Longer Name [C-2]"
]

node SimplerNomenclature #pink [
 "Simpler Nomenclature"
]

component Environment  [
 "Environment"
]

LongerNamedElementCalledC3 -> "PCommand" SimplerNomenclature
LongerNamedElementCalledC3 -> "SCommand" SimplerNomenclature
LongerNamedElementCalledC3 -> "BrCommand" SimplerNomenclature
LongerNamedElementCalledC3 -> "ReCommand" SimplerNomenclature
LongerNamedElementCalledC3 ..> "Vs" ShortC1

LongerNamedElementCalledC3 ..> "feInformation" ASomeHowLongerNameC2

LongerNamedElementCalledC3 ..> "Status" ASomeHowLongerNameC2

LongerNamedElementCalledC3 ..> "feedback" ShortC1

ShortC1 -> "AcInput" LongerNamedElementCalledC3
ShortC1 -> "BrInput" LongerNamedElementCalledC3
ShortC1 -> "sInput" LongerNamedElementCalledC3
ShortC1 -> "gInput" LongerNamedElementCalledC3
ShortC1 -> "bInput" LongerNamedElementCalledC3
ShortC1 -> "Enable" ASomeHowLongerNameC2
ShortC1 -> "Disable" ASomeHowLongerNameC2
ShortC1 -> "Desireds" ASomeHowLongerNameC2
ShortC1 -> "range" ASomeHowLongerNameC2
ShortC1 -> "Destination" ASomeHowLongerNameC2
ShortC1 -> "lrequest" ASomeHowLongerNameC2
ShortC1 -> "cancelation" ASomeHowLongerNameC2
ShortC1 -> "configuration" ASomeHowLongerNameC2

ASomeHowLongerNameC2 -> "Ainput" LongerNamedElementCalledC3
ASomeHowLongerNameC2 -> "Dinput" LongerNamedElementCalledC3
ASomeHowLongerNameC2 -> "srequest" LongerNamedElementCalledC3
ASomeHowLongerNameC2 -> "grequest" LongerNamedElementCalledC3
ASomeHowLongerNameC2 ..> "mode" ShortC1

ASomeHowLongerNameC2 ..> "minformation" ShortC1

ASomeHowLongerNameC2 ..> "einformation" ShortC1

ASomeHowLongerNameC2 ..> "oinformation" ShortC1

ASomeHowLongerNameC2 ..> "Expected" ShortC1

ASomeHowLongerNameC2 ..> "Warnings" ShortC1

SimplerNomenclature ..> "Wheel" LongerNamedElementCalledC3

SimplerNomenclature ..> "Wheel" ShortC1

Environment ..> "Vfeedback" ShortC1
Environment ..> "Uinput" ASomeHowLongerNameC2
Environment ..> "Dfeedback" SimplerNomenclature
@enduml

-------- cut here --------
commented Oct 27, 2022 by The-Lu (63,920 points)

Hello R.,

You can use `ELK` engine, with adding:

!pragma layout elk

See the corresponding result:

See doc. here:

If that can help,
Regards.

commented Oct 27, 2022 by Raphael

Thanks for the reply!

I saw that ELK was a possibility, but it still does not generate a "professional looking" indecision diagram. I cannot allow for the names to clutter. I would either need padding there or that they can vertically align with the arrows.

 Interestingly, with spaces and new lines it kinda moves to that direction. I will check further what I can do on the generation side, perhaps there are some tweaks I can do while generating which will generate diagrams as in my reply to my own quesiton.

1 Answer

0 votes
answered Oct 26, 2022 by Raphael
While investigating what could be done to fix this, I found some trials on the net and manage to solve it like below. Nevertheless, this is really a trial and error approach. Since by adding/removing connections and changing the lengths of new lines and spaces, the diagram gets cluttered again.

The labels on the arrows still cannot follow a pattern and also get mixed with the conectors.

Here is the model which looks better:

-------------- cut here --------------------

@startuml
left to right direction
skinparam linetype ortho
skinparam ranksep 150

node "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n                                      LongerNamedElementCalledC3" as LongerNamedElementCalledC3 #aliceblue

node "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n                       ShortC1" as ShortC1 #aliceblue

node "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n                                       ASomeHowLongerNameC2" as ASomeHowLongerNameC2 #aliceblue

node "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n                                        SimplerNomenclature" as SimplerNomenclature #pink

component "\n\n\n\n\n\n\n                                           Environment" as Environment

LongerNamedElementCalledC3 -> "PCommand" SimplerNomenclature
LongerNamedElementCalledC3 -> "SCommand" SimplerNomenclature
LongerNamedElementCalledC3 -> "BrCommand" SimplerNomenclature
LongerNamedElementCalledC3 -> "ReCommand" SimplerNomenclature
LongerNamedElementCalledC3 ..> "Vs" ShortC1

LongerNamedElementCalledC3 ..> "feInformation" ASomeHowLongerNameC2

LongerNamedElementCalledC3 ..> "Status" ASomeHowLongerNameC2

LongerNamedElementCalledC3 ..> "feedback" ShortC1

ShortC1 -> "AcInput" LongerNamedElementCalledC3
ShortC1 -> "BrInput" LongerNamedElementCalledC3
ShortC1 -> "sInput" LongerNamedElementCalledC3
ShortC1 -> "gInput" LongerNamedElementCalledC3
ShortC1 -> "bInput" LongerNamedElementCalledC3
ShortC1 -> "Enable" ASomeHowLongerNameC2
ShortC1 -> "Disable" ASomeHowLongerNameC2
ShortC1 -> "Desireds" ASomeHowLongerNameC2
ShortC1 -> "range" ASomeHowLongerNameC2
ShortC1 -> "Destination" ASomeHowLongerNameC2
ShortC1 -> "lrequest" ASomeHowLongerNameC2
ShortC1 -> "cancelation" ASomeHowLongerNameC2
ShortC1 -> "configuration" ASomeHowLongerNameC2

ASomeHowLongerNameC2 -> "Ainput" LongerNamedElementCalledC3
ASomeHowLongerNameC2 -> "Dinput" LongerNamedElementCalledC3
ASomeHowLongerNameC2 -> "srequest" LongerNamedElementCalledC3
ASomeHowLongerNameC2 -> "grequest" LongerNamedElementCalledC3
ASomeHowLongerNameC2 ..> "mode" ShortC1

ASomeHowLongerNameC2 ..> "minformation" ShortC1

ASomeHowLongerNameC2 ..> "einformation" ShortC1

ASomeHowLongerNameC2 ..> "oinformation" ShortC1

ASomeHowLongerNameC2 ..> "Expected" ShortC1

ASomeHowLongerNameC2 ..> "Warnings" ShortC1

SimplerNomenclature ..> "Wheel" LongerNamedElementCalledC3

SimplerNomenclature ..> "Wheel" ShortC1

Environment ..> "Vfeedback" ShortC1
Environment ..> "Uinput" ASomeHowLongerNameC2
Environment ..> "Dfeedback" SimplerNomenclature
@enduml

--------------- cut here --------------------
...