More compact (Vertical) diagram

0 votes
asked Mar 3, 2021 in Question / help by Reem Abdel-Rahman

Hello,

This is a two-part question 

    1. I use plantUML to get diagrams similar to the diagram in the link below. Is there a way to get the diagram in a more vertical structure? I have tried  

        !pragma useVerticalIf on        

but if doesn't make any difference. 

2. I am using skinparam defaultTextAlignment center to make the text in all the activities in the center. However, I want to have one activity where the text is left-aligned. Is there a way to specify the text alignment for one activity? 

link of the image: https://drive.google.com/file/d/16Y5IMbbbslO672Ej7avURnVKKuifytCp/view?usp=sharing 

Your help is very much appreciated!

1 Answer

0 votes
answered Mar 4, 2021 by Martin (8,360 points)
edited Mar 4, 2021 by Martin
 
Best answer

I think the problem you are having is that a standard if/else has the outputs coming out the two sides, making it wide:

You can get one of the exits to come out of the bottom in two ways:

1) using elseif

2) using an implicit else

Option 1 is more logical and works with "!pragma useVerticalIf on", but I couldn't find any syntax to label the first "no" path.

Here is the best I could do using 'endif' and 'useVerticalIf' :

And here is my effort using implicit elses:

I hope this gives some ideas.

It does seem to be a lot of messing around for something that you'd hope the tool would do automatically for you.

And it would be good if @plantuml supported "(cond1-false-text) elseif (condition2) (cond2-true-text)" rather than just "elseif (condition2) (cond2-true-text)".

commented Mar 4, 2021 by Reem Abdel-Rahman

Thanks a lot! This is helpful :)

It would be great to have a skinparam to change the layout of the diagram. and yes, it would be also great to support (cond1-false-text).

...