Please provide a "together" keyword to group diagram nodes together

0 votes
asked Apr 10, 2016 in Closed feature request by huanle0610 (150 points)

Please provide a "together" keyword to group diagram nodes together, so that I would be able to better organize the nodes of my diagram.

With this I could for example move Data Source  to THE LEFT of Proxy in following diagram:

top to bottom direction

storage "Data Source" as DS
storage "Proxy" as P
storage "Reader" as R
storage "Writer" as W
storage "Records" as Rs
storage Consumer

database "Data Store" as Store

DS -r-> P
P .l.> DS
P -u-> R
W .u.>> P
R -> Rs

Rs -d-> Store
Store .l.>> W
Store -> Consumer

1 Answer

+1 vote
answered Apr 11, 2016 by plantuml (182,820 points)
selected Apr 11, 2016 by huanle0610
 
Best answer

The together keyword has been released in V8040.

So you can have :

@startuml
together {
storage "Data Source" as DS
storage "Proxy" as P
}
storage "Reader" as R
storage "Writer" as W
storage "Records" as Rs
storage Consumer
 
database "Data Store" as Store
 
 
DS -r-> P
P .l.> DS
P -u-> R
W .u.>> P
R -> Rs
 
Rs -d-> Store
Store .l.>> W
Store -> Consumer
@enduml


There is also an ugly workaround, using packages to force node's layout :

@startuml
skinparam package<<Layout>> {
  borderColor Transparent
  backgroundColor Transparent
  fontColor Transparent
  stereotypeFontColor Transparent
}
skinparam shadowing false

package foo <<Layout>> {
storage "Data Source" as DS
storage "Proxy" as P
}
storage "Reader" as R
storage "Writer" as W
storage "Records" as Rs
storage Consumer

database "Data Store" as Store
 

DS -r-> P
P .l.> DS
P -u-> R
W .u.>> P
R -> Rs

Rs -d-> Store
Store .l.>> W
Store -> Consumer
@enduml

commented Apr 11, 2016 by huanle0610 (150 points)
Well done! expecting wonderful chart with more simplicity.
...