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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Colors have to be defined in UpdateElementStyle() too, otherwise error in dynamic legend

kirchsth opened this issue · comments

If an UpdateElementStyle() call does not define all colors, then the missing colors are shown in the legend as no ... color.

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
UpdateElementStyle(person, $fontColor="green")
Person(p, "Person")
SHOW_LEGEND()
@enduml

(Workaround:) If the missing colors are defined with the default colors then it is working, but this should not be necessary.

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
UpdateElementStyle(person, $fontColor="green", $bgColor=$PERSON_BG_COLOR, $borderColor=$PERSON_BORDER_COLOR)
Person(p, "Person")
SHOW_LEGEND()
@enduml