plantuml/plantuml-stdlib

C4 library doesn't work with !pragma layout smetana

abhineet09 opened this issue · 5 comments

Diagrams generated using C4-plantuml library, doesn't render relationships when !pragma layout smetana is used

Sample notation:

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!pragma layout smetana
System_Boundary(a, "a"){

Container_Boundary(b, "b"){

      Component(c, "c", "xyz", "c")

}
}

Person(d, "d")
Person(e, "e")

Rel(a, d, "a to d")
Rel(a, e, "a to e")
Rel(b, c, "b to c")
@enduml

Without Smetana layout:

raw

With Smetana Layout:

Capture

Hi @abhineet09,

I'm not sure if smetana is maintained at all, maybe you test it with the elk layout.

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!pragma layout elk
System_Boundary(a, "a"){

Container_Boundary(b, "b"){

      Component(c, "c", "xyz", "c")

}
}

Person(d, "d")
Person(e, "e")

Rel(a, d, "a to d")
Rel(a, e, "a to e")
Rel(b, c, "b to c")
@enduml

BR Helmut

Elk is an alpha feature, and results in this error with no diagram:
image

Do you have the problem with a local plantuml.jar file?
Does it work on the PlantUML server?

If it is a local problem:
Do you have elk-full.jar in the same folder as the plantuml.jar?
If not please add it and try it again (details see Usage)

If it doesn't work on server too:
Can you add a sample.

BR Helmut