Can we have a background color for arrow text (in state diagrams)

0 votes
asked 5 days ago in Wanted features by AnneVl (160 points)

Is it possible to add a background color to arrow text of a state diagram?

I often find it easier to categorize arrows like that instead of arrow color. It makes reading the diagram easier in my opinion.

I made a small mock-up of what I mean:

PlantUML arrow background  color

2 Answers

0 votes
answered 5 days ago by The-Lu (5,860 points)

Hello A.,

A possible workaround is to use note (as your another question or comment on QA-9558):

note on link  #palegreen : enable


[click to see on PlantUML server]

If that can help,
Regards,
Th.

0 votes
answered 5 days ago by The-Lu (5,860 points)

Hello A.,

After a workaround, a solution is to used HTML/Creole feature of background color on the arrow text:

state Disabled #lightblue
state Idle #orange

Disabled ---> Idle : <back:plum>enable
Idle ---> Disabled : <back:#DDA0DD>disable

Here is the result:


[Link to PlantUML server]

If that can help,
Regards,
Th.

commented 4 days ago by AnneVl (160 points)
Thanks that works! I did not know that was an option!
...