Can I force class diagram element to go to "next line" ?

0 votes
asked Dec 21, 2017 in Wanted features by cristian (150 points)
recategorized Dec 21, 2017 by cristian

Sorry if I missed something. I did go through the docs and tried some searches...

I started creating some classes, interface and connecting them and I noticed elements are render in a single line on the canvas.

Take the two relations below. The second will be painted to the right of the first. If I keep adding, there will be a very wide and not so tall image (weird width to height ratio)

MyInterface <|-- MyClass
MyInterface1 <|-- MyClass1

So, can I make it the second relation show under the first relation, basically draw the uml elements on multi lines?

thanks

Cris

1 Answer

0 votes
answered Dec 21, 2017 by Serge Wenger Work (6,820 points)
selected Dec 21, 2017 by cristian
 
Best answer

Hello,

It is sometimes difficult to layout diagrams. Sometimes you can give "suggestions" with hidden link like:

@startuml
MyInterface <|-- MyClass
MyInterface1 <|-- MyClass1
MyInterface1 -up[hidden]- MyClass
@enduml

commented Dec 21, 2017 by cristian (150 points)
Yes, it did draw under but that is not really going to scale very well.
Again, maybe I am missing something, but wouldn't this be a useful feature.
commented Dec 21, 2017 by Serge Wenger Work (6,820 points)
Hello,
Plantuml class layout is automatic (Graphviz based). You can only give indications (see chapter 3.21 Changing arrows direction and 3.26 Help on layout).

If you really need "strict" layout, it will be difficult.
commented Dec 21, 2017 by cristian (150 points)
I see.  :(

I tried "together" and page splitting, still no good.
I guess I could try and use separate files as a workaround.

thank you
...