Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cc-stjm opened this issue Mar 20, 2024 · 3 comments
Closed

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

cc-stjm opened this issue Mar 20, 2024 · 3 comments
Milestone

Comments

@cc-stjm
Copy link

cc-stjm commented Mar 20, 2024

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-

@cc-stjm cc-stjm changed the title Legend seems to include unexpected properties (e.g. $lineStyle) Legend text seems to include unexpected properties (e.g. $lineStyle) Mar 20, 2024
@cc-stjm cc-stjm changed the title Legend text seems to include unexpected properties (e.g. $lineStyle) Legend text includes unexpected properties (e.g. $lineStyle) Mar 20, 2024
@kirchsth
Copy link
Member

kirchsth commented Mar 20, 2024

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

  • $borderstyle should use lowercase values "solid",... (or I would even prefer the macros SolidLine(),...)
  • and if $borderThickness="1" should not be displayed in the legend then it should not be set otherwise it is assumed it has a special meaning and therefore it is added to the legend
  • (not relevant for the concrete problem, but maybe it can be changed too)
    • instead of "top to bottom direction" it should use LAYOUT_TOP_DOWN()
    • instead of "left to right direction" LAYOUT_LANDSCAPE(), in special LAYOUT_LANDSCAPE() offers a special implementation that the directions of the relations are correct

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
Copy link
Member

kirchsth commented Mar 21, 2024

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

@kirchsth kirchsth added this to the v2.10.0 milestone Mar 21, 2024
kirchsth added a commit that referenced this issue Mar 22, 2024
#342 Legend displays unknown borderStyle values too (instead of $lineStyle)
@cc-stjm
Copy link
Author

cc-stjm commented Mar 27, 2024

Thanks, that works

@cc-stjm cc-stjm closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants