Skip to content

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

@kirchsth

Description

@kirchsth

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions