plantuml / plantuml-stdlib

Contains official Standard Library for PlantUML
557 stars 122 forks source link

C4 library doesn't work with !pragma layout smetana #45

Closed abhineet09 closed 6 months ago

abhineet09 commented 3 years ago

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

kirchsth commented 3 years ago

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

huornlmj commented 2 years ago

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

kirchsth commented 2 years ago

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

kirchsth commented 6 months ago

Hi all,

I checked it again, and smetana looks fixed in the meantime

BR Helmut

The-Lum commented 6 months ago

Hi all,

[This is an Issue Review] 👀 This is now answered.

Regards.