Elseif SkinParam doesn't seem to use the ActivityDiamond

0 votes
asked Jul 31, 2018 in Question / help by Jeff Martin

I'm trying to use skin params and while the If, else skin just fine, the diamond created by the elseif does not... 

skinparam activity {
   BackgroundColor #00538D
   BorderColor #00538D
   BorderThickness 1
   BorderRoundCorner 1
   ArrowColor #8CC63E
   FontName Helvetica
   FontColor White
   DiamondBackgroundColor #00538D
   DiamondBorderColor #00538D
   DiamondFontName Helvetica
   DiamondFontColor White
title If else elseif example
if (If Text) then (yes)
:Do Something;
else (No)
if (Option A) then 
:A Thing>
elseif (Option B)
:B Thing>
elseif (Option C)
:C thing>
commented Aug 1, 2018 by albert (3,120 points)
Looks like that some entities are used for the "if / else if" construct (I like not to reuse colors for test cases like these so it will be even more clear what is the problem and what influences what):
   DiamondBackgroundColor #ffffff
   DiamondBorderColor #ff0000
   DiamondFontName Helvetica
   DiamondFontColor #00ff00
just not the DiamondFontColor. It looks like the DiamondFontColor  is only used in a simple "if / else" construct.

1 Answer

0 votes
answered Aug 2, 2018 by plantuml (257,860 points)
Thanks for the report : it's actually a bug

It should be fixed in last beta http://beta.plantuml.net/plantuml.jar

Tell us if it's not working for you
commented Aug 8, 2018 by jmartin (120 points)
Generally using Planttext.com and the plugin in confluence so no good way of testing - but thanks for the response - always good to know i'm not doing something wrong/stupid.
commented Jan 20, 2019 by albert (3,120 points)
Looks like it is not yet / anymore working or it is not clear how it should work: https://stackoverflow.com/questions/54267722/how-to-replicate-flowchart-using-plantuml-or-graphviz
commented Jan 21, 2019 by albert (3,120 points)
The example from the stackoverflow site

skinparam linetype polyline
skinparam linetype ortho
skinparam backgroundColor #ff000000

skinparam ActivityDiamondBackgroundColor red
skinparam ActivityDiamondBorderColor blue

skinparam activity {
BackgroundColor<<iftrue>> #f4d03f
BorderColor<<iftrue>> #FF6655
BackgroundColor<<cond>> #58d68d
BorderColor<<cond>> #58d68d
BackgroundColor<<step1>> #58d68d
BorderColor<<step1>> #58d68d
ArrowColor #Black
DiamondBackgroundColor red
DiamondBorderColor blue
FontName Impact

(*) -down[#black]-> "Evaluate loss index"  as step1 <<step1>>
step1 -down-> if "" as conif then
-left[#black]-> [Stopping criteria = true] "Improve neural network parameters
    * Calculate quasi-Newton training direction
    * Calculate training rate" as iftrue <<iftrue>>
iftrue -up[#black]-> step1
    -down[#black]-> [Stopping criteria = false] (*)

commented Jan 22, 2019 by albert (3,120 points)
I tested the stackoverflow version with the newest beta (PlantUML version 1.2019.01beta4) and it gave the, for me, expected results (version PlantUML version 1.2019.01beta3 didn't).
The workaround as shown in the comment from @plantuml works in bot cases.