How to force activity diagram to squash horizontally

0 votes
asked Oct 24, 2023 in Question / help by anonymous
edited Oct 24, 2023

Hello, I am building an activity diagram to be placed inside DoxyGen documentation and it is very wide, because it places boxes that are vertically below each other also horizontally next to each other, which I think is awfull waste of space and makes the diagram unnecessarily wide. Is there any way how to force diagram stay as thin as possible?

To help you imagine what I mean, the blocks are arranged like this:

Block
Block
Block

But I'd want it to arrange them like this:

      Block      
Block
Block

Which would safe some horizontal space.

EDIT:
Example of plantuml that result in unsatisfactory diagram layout:

@startuml
title Example

|Line1|
start
|Line3| /' this is here to plot Line3 swimline before Line2'/
|Line2|
if (ondition1) then (true)
|Line3|
    :Do the first thing;
else (false) 
    |Line2|
    if (Condition2) then (true)
    |Line3|
        :Do the second thing;
    |Line1|
    else (false)
        |Line2|
        if (Condition3) then (true)
        |Line3|
            :Do the third thing;
        else (false)
        endif
        :Also do this;
        |Line1|
    endif
endif
|Line1|
:end;
stop
@enduml

commented Oct 24, 2023 by albert (3,540 points)
Can you give some plantuml example code that results in the unwanted type of diagram?
commented Oct 24, 2023 by anonymous
example added to the question

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...