How use different color for arrows in State Diagram ?

+4 votes
asked Dec 10, 2012 in Closed question / help by plantuml (278,240 points)
I need to use different color for some of the arrows in State Diagram. Is this possible and if so could you provide the syntax?

1 Answer

+8 votes
answered Dec 10, 2012 by plantuml (278,240 points)

You can use the following syntax:

@startuml
State S1
State S2
S1 -[#DD00AA]-> S2
S1 -left[#yellow]-> S3
S1 -up[#red,dashed]-> S4
S1 -right[dotted,#blue]-> S5

X1 -[dashed]-> X2
Z1 -[dotted]-> Z2
Y1 -[#blue,bold]-> Y2
@enduml

...