AddElementTag color bug

0 votes
asked Oct 28, 2021 in Bug by Armin

Hi,

I am using C4 in Jira plantuml with version 1.2021.12 ( but didnt work in 1.2021.9 either).

In Visual Studio Code it works ( with the exchange of the include to

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

Result is

"!if($PlantUMLSupportDynamicLegendColor)

!$fo=$contrastLegend($bg)

!if (%is_dark($color))

fatal parsing error"

Funny that Legend is not show in Visual Studio Code either, so why the heck it is trying to render the legend?

@startuml

!include <c4/C4_Context.puml>

!include <C4/C4_Container>
'HIDE_STEREOTYPE()


AddElementTag("col_ug", $bgColor="#FFFFFF")

System(ug"User Group"
System(bc,"Business Capability"

System(ps"Process" )
System(do"Data Object")
System(if, "Interface")
System(app, "Application")
System(pj"Project")
System(pv"Provider")
System(ic"IT Component")
System(ts,"Tech Stack")




app -left- if
app -left- do
app -up- ug
app -up- bc
app -up- ps
Lay_R(app,pj)
Lay_D(app,pv)
app -down- ic

if - ic
ic -left- pv
ic -right- ts
Lay_D(do,if)

@enduml

1 Answer

0 votes
answered Oct 28, 2021 by kirchsth (2,270 points)

Hi Armin,

it could be a version problem like in https://forum.plantuml.net/14841/render-rectangle-bug

Which version do you see with
@startuml
%version()
@enduml


BR Helmut

PS.: the legend is calculated in the background dynamically that it can be displayed if required.
 

commented Oct 28, 2021 by Armin
Hi, thanks for picking up my issue. It is showing 1.2021.12. Actually I asked the Jira admins to update to this version since i saw a bugfix for a color issue, but was not successful :(
commented Oct 28, 2021 by Armin
Hi, issue can be losed my fault.

Code copied into the PlantUML Marco in Jira must be non-formatted.

If you copy from e.g. Visual Studio Code it will copy the text highlighting and that is breaking the macro.
...