Vertical Alignment of States in State Diagram with a transition from bottom to top state

0 votes
asked Aug 26, 2025 in Question / help by turbinenreiter

Hello,

I have this diagram (simplified example):

@startuml Example

state a
state b
state c
state d

a -d-> b
b -d-> c
c -d-> d

d --> a

@enduml

which produces this rendering:

https://uml.planttext.com/plantuml/png/SoWkIImgAStDKN2jICmjo4dbuWAAbAGg94Bf92YT3ALJkBWI5NHJTEs0CaaGHZ9NCeG1b4jHq0Ko4hcu75BpKe360W00

Is there a way to force the states to be underneath each other, without floating to the left, and the arrow from d to a to curve around the right side?

Thank you very much for your input.

1 Answer

0 votes
answered Sep 4, 2025 by AnonymousCoward

If you use -> instead of --> it comes out in a straight line albeit horizontally

@startuml
state a
state b
state c
state d

a -> b
b -> c
c -> d
d -> a

@enduml

commented Sep 4, 2025 by The-Lu (89,080 points)

Hello T., and A.,

Then here is the vertical version, using `left to right direction`:

@startuml
left to right direction
state a
state b
state c
state d

a -> b
b -> c
c -> d
d -> a
@enduml

Enjoy,
Regards,
Th.

commented Sep 4, 2025 by The-Lu (89,080 points)

Or, on the good order:

@startuml
left to right direction
state a
state b
state c
state d

b -> c
c -> d
d -> a
a -> b
@enduml

Enjoy,
Regards,
Th.

commented Sep 11, 2025 by turbinenreiter
Thank you both; this helped me tremendously.
...