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

0 votes
asked Jul 29, 2020 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 Jul 29, 2020 by The-Lu (63,920 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 Jul 29, 2020 by The-Lu (63,920 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 Jul 30, 2020 by AnneVl (160 points)
Thanks that works! I did not know that was an option!
...