How to move a node to left

0 votes
asked Apr 10, 2016 by huanle0610 (150 points)

TH

How can I move Data Source  to THE LEFT of Proxy?

 

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

 

commented Apr 11, 2016 by Serge Wenger Work (4,850 points)
Sometimes, I have the same problem. It is very damaging. It is the bigger problem of this so great tool.
commented Apr 11, 2016 by huanle0610 (150 points)
Yeah, It's not adhere to my intuition. Maybe I need to read the source code of plantuml. PlantUml is an Venus, not perfect but really charming.

2 Answers

0 votes
answered Apr 11, 2016 by plantuml (132,110 points)
selected Apr 11, 2016 by huanle0610
 
Best answer

This issue is more related to the way GraphViz is doing its layout, and it's not easy to work arround.

Actually, there is an ugly workaround, using packages to force node's layout :

 

Source:

@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

 

This solution is really a dirty hack...

Maybe we should add an "together" kind of package in addition to package / node / folder / frame / cloud / database. This would create just an invisible package.

So you could 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

 

What do you think about it ?

commented Apr 11, 2016 by huanle0610 (150 points)
Well done! expecting wonderful chart with more simplicity.
commented Apr 12, 2016 by plantuml (132,110 points)
In last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar we have implemented the "together" keyword.

Just tell us if it helps!
0 votes
answered May 16, 2016 by plantuml (132,110 points)
...