Lengthy diagrams

0 votes
asked Feb 18, 2015 in To be sorted by anonymous

The diagrams are generated very ugly. Long. How can I make it more squarely? Can I set ratio?

 

Examle: http://pastebin.com/LCYX2udk

 

commented Feb 18, 2015 by anonymous
Good idea place elements as greed. It possible?

1 Answer

0 votes
answered Feb 18, 2015 by plantuml (295,800 points)
 
Best answer

Unfortunatly, this is highly related to Graphviz, and there is not much that we can do.

The only work arround is to specify hidden links between element, to change the layout.

For example:

package foo {
  component L1001
  note bottom : note1
  component L1002
  note bottom : note2
  component L1003
  note bottom : note3
  component L1004
  note bottom : note4
  L1001 -[hidden] L1002
  L1001 -[hidden]-- L1003
  L1003 -[hidden] L1004
}

But this is not very handy...



 

commented Feb 18, 2015 by anonymous
Not handy. But it's something.
Why three dashes? It's length of relation? How I can set length for horisontal line?
commented Feb 18, 2015 by plantuml (295,800 points)
The number of dashed sets the parameter "minlen" in dot ( see http://www.graphviz.org/doc/info/attrs.html#d:minlen ).
It's difficult to explain if you don't know graphiz concept, but basically:

1 dash means minlen = 0 ; nodes would be on the same rank
2 dashes means minlen = 1 ; in our case L1003 and L1004 would clash with note1 and note2
3 dashes means minlen=2 ; in our case, L1003 and L1004 are on level down to note1 and note2;
To better understand, you can try 4 dashes:

package foo {
  component L1001
  note bottom : note1
  component L1002
  note bottom : note2
  component L1003
  note bottom : note3
  component L1004
  note bottom : note4
  L1001 -[hidden] L1002
  L1001 -[hidden]-- L1003
  L1002 -[hidden]--- L1004
}

On that case, note3 and L1004 have the same rank:

http://www.plantuml.com/plantuml/png/AqXCpavCJrL8oyzNgEPIK4ZEpot8pqlDAr7mCJGmC0IAvEMNf2eavPUKvESgM85vXXZgZB2gCy9GPunLdJ66EXEiwa2YO5Sfw4PdPAQafER5mcr74zVLXTi7Le4iemkreXO0
commented Feb 18, 2015 by anonymous
But also the number of dashes set the direction. Is it possible to make a long horizontal communication?

http://www.plantuml.com:80/plantuml/png/AqXCpavCJrL8oyzNgEPIK2Z9Br2mqTLLY7REpot8pqlDAua5YkQaffK0XT54aNWAkhgwTWf9-IKb-RdeCdOAHPdf6ILSjG00
@startuml
package foo {
  top <-- [Component]
  left <- [Component]
  [Component] ---> bottom
  [Component] -> right
}
@enduml
commented Feb 18, 2015 by plantuml (295,800 points)
No you cannot for horizontal.
Sorry, but it's really the way Graphviz is generating graph.
If you really want to understand all those limitations, you could play with dot/Graphviz language ( http://plantuml.com/dot.html )
The only solution would be to use another layout engine, and this would mean a huge work : not planned at all for the moment.
...