Don't require dot for shapeless diagrams and svg output

0 votes
asked Sep 20, 2019 in Bug by enikao (140 points)

If I have only a legend in my diagram and set the output to svg, PlantUML still requires dot:

@startuml
legend
Root
end legend
@enduml

I fiddled around to trick PlantUML into a sequence diagram, so it drops the dot requirement. This is the best I could come up with:

skinparam SequenceLifeLineBorderThickness 0
skinparam SequenceLifeLineBorderColor transparent
skinparam SequenceParticipant {
    BackgroundColor transparent
    BorderColor transparent
    Shadowing false
    FontSize 0
    BorderThickness 0
    Padding 0
}
hide footbox  
participant dummy

legend top left
Root
end legend

Is there a more direct way?

1 Answer

0 votes
answered Sep 20, 2019 by plantuml (294,960 points)
selected Sep 21, 2019 by enikao
 
Best answer

Your request give us an idea.
With last beta, if some diagram is empty, we do not call "dot" anymore (which was useless anyway).

So the following one is working with http://beta.plantuml.net/plantuml.jar out of the box, even without dot.

@startuml
legend
Root
end legend
@enduml

Furthurmore, we realize that we do not need dot when there is only one class without any link.

So the following example is also working without dot:

@startuml
class foo
legend
Root
end legend
@enduml

Maybe it could be useful for some people.

commented Sep 21, 2019 by enikao (140 points)
Thanks a lot! Your response time is impressive (-:
...