Closed StephanPirnbaum closed 5 months ago
Hi @StephanPirnbaum,
thank you for the finding, but I think your conclusion is wrong. I think it is elk related, I can reproduce the problem without C4 too. Samples see below.
I entered a bug in the PlantUML forum
BR Helmut
Hi @kirchsth
thank you for the fast investigation and reply. You're right, I was not considering using skinparam which would explain the difference to my example. I can confirm your conclusion.
Hi @StephanPirnbaum,
the last PlantUML beta has a first fix: line color, thickness and style are correct (details see PlantUML PR - Elk: Allow full style on arrows (except fontcolor).
You can download a *.jar file from PlantUML Releases-snapshot - Assets section (I tested it with `plantuml-mit-SNAPSHOT.jar).
The $fontcolor is not correct supported, but if you use $textColor = $ARROW_FONT_COLOR
then the legend uses the same $fontColor as the diagram itself.
e.g. following source
@startuml
!theme C4_united from <C4/themes>
!include <C4/C4_Component>
!pragma layout elk
'!pragma layout smetana
'known issue: $textColor is not working with elk/smetana
' AddRelTag("DEF", $legendText="Java-Abhängigkeit", $textColor = "#green", $lineColor = "#blue", $lineStyle = DottedLine(), $lineThickness=7)
' AddRelTag("DEF", $textColor = "#green", $lineColor = "#blue", $lineStyle = DottedLine(), $lineThickness=7)
' $textColor is not working, but if the unchanged color is defined then the legend displays the correct color again
AddRelTag("DEF", $textColor = $ARROW_FONT_COLOR, $lineColor = "#blue", $lineStyle = DottedLine(), $lineThickness=7)
Component(A, "A")
Component(B, "B")
A -[#orange,dashed]-> B
' WithoutPropertyHeader()
AddProperty("PropC1", "ValueC1")
AddProperty("PropC2", "ValueC2")
Rel(A, B, "Te<$person>st", $tags="DEF")
SHOW_LEGEND()
@enduml
produces following output
Can you please check the fix with your diagrams too?
Thank you and BR Helmut
Hi @kirchsth
thanks for your work. The provided Snapshot resolved the issue for me.
Best Stephan
Hi @StephanPirnbaum,
@arnaudroques create a fix for $fontColor too (details see https://github.com/plantuml/plantuml/issues/1834) that the newest snapshot supports $fontColor too.
@startuml
!theme C4_united from <C4/themes>
!include <C4/C4_Component>
!pragma layout elk
'!pragma layout smetana
' $textColor is working
AddRelTag("DEF", $textColor = "#green", $lineColor = "#blue", $lineStyle = DottedLine(), $lineThickness=7)
' combined stereotypes/tags are working too
AddRelTag("DEF2",$lineColor = "#red")
Component(A, "A")
Component(B, "B")
A -[#orange,dashed]-> B
' WithoutPropertyHeader()
AddProperty("PropC1", "ValueC1")
AddProperty("PropC2", "ValueC2")
Rel(A, B, "Te<$person>st", $tags="DEF2+DEF")
SHOW_LEGEND()
@enduml
BR Helmut
I'm using C4-PlantUML with ELK, as it regularly produces better outputs. However, I ran into an issue when using e.g. lineColor or lineStyle.
In the following example, the relation defined using standard PlantUML syntax is correctly rendered, whereas using the C4-PlantUML it is not.
This leads me to the conclusion that ELK itself has no issues with styling lines (which would have had me wonder, tbh).
When not using ELK, the example is working, however.
For me, that looks like an issue of the combination C4-PlantUML syntax and ELK.