Legend unnecessarily extends diagram size

0 votes
asked Feb 19 in Question / help by roxspring (400 points)

The following diagram includes a "legend right" and happens to have loads of space to the right in the diagram, but the diagram is extended downwards in order to make space for the legend. Would it be possible for the legend placement to first layout the rest of the diagram and then attempt to make use of free space before extending the diagram?

PlantUML diagram

@startuml

[Thing A1]  -> [Thing B1]

[Thing B1]  -> [Thing C1]

[Thing A1] --> [Thing A2]

[Thing A2] --> [Thing A3]

legend right

Legendary

    content

    goes

    here

endlegend

@enduml

(happy for answers to include suggestions of how I might go about implementing the feature and submitting a patch)

commented Feb 21 by albert (3,210 points)
@plantuml I see that there are a number of possibilities: "You can optionally specify to have left, right, top, bottom or center alignment for the legend. " . Test shows that one can even combine "top right" and other combinations between left / right / center and top / bottom, but I don't see a possibility to have the horizontal alignment "center" (or "middle") that would  would be beneficial here

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...