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

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

Closed
kirchsth opened this issue Oct 22, 2022 · 0 comments · Fixed by #251
Closed
Milestone

Comments

@kirchsth
Copy link
Member

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

@kirchsth kirchsth mentioned this issue Oct 22, 2022
7 tasks
kirchsth added a commit to kirchsth/C4-PlantUML that referenced this issue Oct 23, 2022
kirchsth added a commit to kirchsth/C4-PlantUML that referenced this issue Oct 23, 2022
@Potherca Potherca added this to the v2.5.0 milestone Oct 23, 2022
kirchsth added a commit to kirchsth/C4-PlantUML that referenced this issue Oct 23, 2022
kirchsth added a commit that referenced this issue Oct 23, 2022
#247 Element styles are correct combined and dynamic legend is correct calculated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants