Set ArrowFontColor to different colors for different parts of State Diagram

0 votes
asked Mar 7 in Question / help by muteboy (140 points)
Is it possible to set an ArrowFontColor for some arrows, then later to set a different ArrowFontColor  for others?

The skinparam changes it for all arrows.

Can this be done?

1 Answer

+1 vote
answered Mar 7 by The-Lu (49,760 points)

Hello M.,

For that, on a possible solution, you can use style, as:

@startuml
<style>
stateDiagram {
  arrow {
    FontSize 13
    LineColor Blue
    FontColor Blue
  }
}
</style>

state A
state B
state C

A -> B : Link\nfrom A to B

<style>
stateDiagram {
  arrow {
    FontSize 13
    LineColor Red
    FontColor Red
  }
}
</style>
A -> B : Another Link\nfrom A to B
B -> C : a red link
@enduml

Regards,

commented Mar 7 by muteboy (140 points)
That's it! I didn't understand styles completely, but this has helped.

Thank you!

(I +1'd the answer, is that how I mark it as correct?)
...