plantuml-stdlib / C4-PlantUML

C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
MIT License
6.42k stars 1.11k forks source link

Legend text includes unexpected properties (e.g. $lineStyle) #342

Closed cc-stjm closed 8 months ago

cc-stjm commented 8 months ago

I'm generating plantUml from Structurizr CLI, using the C4PlantUMLExporter

The legends are listing styling properties in text, e.g. mentioning $lineStyle - is there something I need to be doing (either within Structurizr or by tweaking the generated PlantUML afterwards) to avoid this?

Example PlantUML (link)

@startuml
top to bottom direction

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

AddElementTag("Element", $bgColor="#dddddd", $borderColor="#9a9a9a", $fontColor="#000000", $sprite="", $shadowing="", $borderStyle="Solid", $borderThickness="1")
AddBoundaryTag("Software System", $bgColor="#ffffff", $borderColor="#0b4884", $fontColor="#0b4884", $shadowing="", $borderStyle="Solid", $borderThickness="1")

System_Boundary("Foo_boundary", "Foo", $tags="Software System") {

Container(Foo.Bar, "Bar", $techn="", $descr="desc", $tags="Element", $link="")

}

SHOW_LEGEND(true)
@enduml

jP7FIyCm5CVl-IjgzD21QoViC8N2t9nwc3zW4uybRTxQi3GfoIjpYF-xIRUEoOxgAxHvtxxtuGCPMsG6cqeIr7M0EiWqegu2BWpaABGYv4oeN3OSWXAnjZTnRDWcAWIMJTPOCBbM20gZN5TnBPdoiBv5BaKMJuVzLn-zFStZYba4uwAeTXD_JasdVkC3_v7EX0ApuvDRpcSIAWTPiYAa-

kirchsth commented 8 months ago

Hi @cc-stjm,

most of the problems are related to the generated source and for that I think the best would be that you create an issue by the C4PlantUMLExporter

But independent of that I will check why $lineStyle is displayed in the legend, this should not be the case at all.

BR Helmut

kirchsth commented 8 months ago

Hi @cc-stjm,

a fix (Solid is supported too) is merged into master. Maybe you want to test it (I removed only the obsolet C4.puml and C4_Context.puml includes that the server does not use a cached image)

@startuml
top to bottom direction

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

AddElementTag("Element", $bgColor="#dddddd", $borderColor="#9a9a9a", $fontColor="#000000", $sprite="", $shadowing="", $borderStyle="Solid", $borderThickness="1")
AddBoundaryTag("Software System", $bgColor="#ffffff", $borderColor="#0b4884", $fontColor="#0b4884", $shadowing="", $borderStyle="Solid", $borderThickness="1")

System_Boundary("Foo_boundary", "Foo", $tags="Software System") {

Container(Foo.Bar, "Bar", $techn="", $descr="desc", $tags="Element", $link="")

}

SHOW_LEGEND(true)
@enduml

cc-stjm commented 8 months ago

Thanks, that works