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:

http://www.plantuml.com/plantuml/png/TOz1JWCn34NtFeKr-oxQ8bO8bKvlm0bCOj4HYJrA7112lJiXeweDXKKY-JtR-jvbesGb1iXlayoKA69KKNTC6Xaj5RuoOHAspvbHanqLm9FH2sN6CMZn08cTaRm6nWE_Juxn2n2Tnbc5nN3KsDLxfUHR3-9bT3pxzNzYKyMfs_JCadbzYpQtQDkX9sTmkZhai0Ten-33okk7h1vRwlekeCM6zbTOvef-nfOCs7SjAN2u7_uIMnpkVWkeaSvh5x9ZyIM6Rm00

Code:

@startuml
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
@enduml

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

Thanks,

Marco

2 Answers

0 votes
answered Jun 1, 2021 by The-Lu (63,920 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,
Regards,
Th.

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...

...