Is it possible to combine left to right direction with top to bottom direction in a package overview?

0 votes
asked Jul 4, 2017 in Can't help by Nemelis (120 points)
edited Jul 4, 2017 by Nemelis

Hi,

I'm new to plantuml and until now loving it.

But I have a small problem:

I want to draw a picture depicting that we have one package defining in interface (and implementing it with some simulation implementation). And 2 other packages doing the real implementation of the interface.

What I would like is to show the defining package on top and the implementing interfaces side-by-side below it.

Up to now I only succeeded in having all packages below eachother:

@startuml

left to right direction

package Defining {

  interface MyInterface

  component [Simulation]

  [Simulation]-up.>MyInterface

}

Package Real1 {

  component [RealImp1]

  [RealImp1]-up.>MyInterface

}

Package Real2 {

  component [RealImp2]

  [RealImp2]-up.>MyInterface

}

@enduml

If I add 'top to bottom direction' anywhere in the snippet the aligment for all changes so the packages are placed next to eachother. So I'm probably doing something wrong wink

Is there a way that I can get what I want?

/*edit*/

I already found out how:

@startuml

left to right direction

package Defining {

  interface MyInterface

  component [Simulation]

  [Simulation]-down.>MyInterface

}

Together {

  top to bottom direction

  Package Real1 {

    component [RealImp1]

    [RealImp1]-up.>MyInterface

  }

  Package Real2 {

    component [RealImp2]

    [RealImp2]-up.>MyInterface

  }

}

@enduml

1 Answer

0 votes
answered Jan 26, 2018 by Anthony-Gaudino (5,720 points)

The left to right direction and  top to bottom direction currently always change whole diagram.

In your edit example, removing those generates the same diagram.

commented Feb 4, 2019 by nmz787
I get syntax error when attempting to use "left to right direction" in an activity diagram, it says "Syntax error: start"
@startuml
left to right direction
start
:A;
if (Q1) then (yes)
  :B;

  if (Q2) then (yes)
    :D;
  else (no)
    :E;
    :call C>
  endif
else (no)
  :call C>
endif
stop
partition C {
  :do 1st C thing;
  :do 2nd C thing;
}
@enduml
...