Weird layout of arrows

0 votes
asked May 24, 2019 in Question / help by maw (120 points)

Hey guys,

I have a problem with the following diagram:


skinparam monochrome true
skinparam dpi 300
skinparam linetype ortho

database Cloud

rectangle Device {
  component Com
  component Board {
    rectangle Component1
    rectangle Component2
  component Sense1
  component Sense2
  component Sense3
  component Act

database DB

Cloud <-down-> Com
Com <-down-> Board
Board <-up-> DB

Sense1 -down-> Board
Sense2 "6" -down-> Board
Sense3 "4" -down-> Board

Act <-up-> Board

What bothers me is the strange layout of the arrow from "Sense1" to "Board". Any ideas how to improve that?



2 Answers

0 votes
answered Jun 1, 2021 by The-Lu (60,440 points)

Hello M.,

As explained here we are currently testing Eclipse Layout Kernel.

Then, here are the corresponding diagrams:

Without layout elk
(old fashion)
With layout elk
(new fashion)

Enjoy, (from V1.2021.5)

If that can help,

0 votes
answered Jun 1, 2021 by Martin (8,360 points)

Plantuml connects containers (shapes that contain other shapes) in odd ways (i.e. using the corners).  But given that you are not trying to connect to Component1 or Component2, then you have the option of turning them into a sub-diagram.  This means that Board is a shape containing the picture of two shapes rather than the two shapes themselves, and Plantuml handles that better (IMHO).

@Plantuml - we get a lot of questions about the confusing layout of containers.  Maybe we need a style parameter that treats containers the same as empty rectangle shapes...