Request for enhanced control of arrow direction and anchor points in the sample organization chart

0 votes
asked Jul 19, 2023 in Wanted features by anonymous
Dear PlantUML Authors,

I hope this message finds you well. I would like to bring to your attention a limitation that I have encountered while using PlantUML for creating organizational charts and diagrams. Currently, there is no straightforward way to disable the automatic generation of arrows between components, nor is there an option to specify the side of a component from which the arrows should emanate.

The specific issue arises when attempting to create an organizational chart where the arrows should exit from the bottom of a component and connect to other components. The default behavior of PlantUML aligns the arrows differently, resulting in a layout that does not match the intended structure.

To illustrate the problem, consider the following example:

@startuml
rectangle P
rectangle A {
  rectangle B1
  rectangle B2
  rectangle B3
  rectangle B4
}
rectangle C
rectangle D
P --> A
A --> C
A --> D
@enduml
 

In this example, when I add child elements to component A, the arrows are not aligned as intended. The arrows do not exit from the bottom of A and the layout becomes distorted.

To work around this limitation, I have resorted to using the `[state]` elements instead of the `[rectangle]` elements, as shown below:

@startuml
hide empty description
state P
state A {
  state B1
  state B2
  state B3
  state B4
}
state C
state D
P --> A
A --> C
A --> D
@enduml
 

Although this workaround somewhat achieves the desired layout, it is not semantically accurate as the `[state]` elements are not specifically designed for organizational charts.

I kindly request you to consider this as a feature enhancement request and evaluate the possibility of implementing a solution that allows users to control the direction of arrows and specify the side from which they should emanate. This enhancement would greatly enhance the flexibility and usability of PlantUML for creating organizational charts and similar diagrams.

I appreciate your attention to this matter and your consideration of this feature request. Thank you for your ongoing efforts in developing and maintaining PlantUML.

Best regards
commented Jul 19, 2023 by The-Lu (67,080 points)

Hello A., and all,

[Just to complete...]
FYI: the main issue is the usage of GraphViz... (or the underlying algorithms)

See on the FAQ:

And even using the ports (to force anchors) is not better:

@startuml
rectangle P
rectangle A {
  portin "i1" as i1
  rectangle B1
  rectangle B2
  rectangle B3
  rectangle B4
  portout "o1" as o1
  portout "o2" as o2
}
rectangle C
rectangle D
P --> i1
o1 --> C
o2 --> D
@enduml

(Bug in progress)...:

If that can help, just to complete your observation.

Regards,
Th.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...