How to align components vertically?

0 votes
asked Sep 13, 2023 in Question / help by Mohammad Faisal

I have a plantuml components diagram where I have multiple components which by default seems to be placed horizontally but I want them to align vertically. Is it possible to control the layout of plantuml components?

@startuml
'https://plantuml.com/component-diagram

component [ABC] as a
component [PQR] as p
component [XYZ] as x

map "some table" as mo{
1 =>
2 =>
3 =>
... =>
}

a -> mo
p -> mo
x -> mo
@enduml

1 Answer

0 votes
answered Sep 13, 2023 by The-Lu (64,300 points)
 
Best answer

Hello M., and all,

From:

via:

You can change the layout orientation and adjust the arrow def (`->` to `-->`) with:

left to right direction

Then here is the expected result:

Enjoy,
Regards,
Th.

commented Sep 14, 2023 by Mohammad Faisal

Hi The-Lu,

The diagram seems to be correctly generated at https://www.planttext.com/... but I use PlantUML plugin in IntelliJ where I still do not get the desired result.

https://imgur.com/a/A26lnjc

commented Sep 14, 2023 by The-Lu (64,300 points)

Hi M.,

  • Have you adjust the arrow def (`->` to `-->`)?

Regards,
Th.

commented Sep 14, 2023 by Mohammad Faisal
edited Sep 14, 2023
Oh. I missed that. This works now after changing `->` to `-->`.

If possible can you share the documentation link related to `->`, `-->` and `left to right direction`?
commented Sep 14, 2023 by The-Lu (64,300 points)

Hi all,

If possible can you share the documentation link related to `->`, `-->` and `left to right direction`?

Changing arrows direction:

Left to right direction:

Enjoy,
Regards,
Th.

...