How can I place text left of the state transition arrow in state diagrams?

+1 vote
asked May 21, 2015 in To be sorted by anonymous

Given this diagram:

@startuml

state "Inbox Processor" as State0 {
[*] --> IDLE
IDLE --> BUSY : [left] Data Arrives
BUSY --> IDLE : [right] Done
}

@enduml

How can I get the text "Data Arrives" placed to the left of the arrow?  It seems like the default is to always place text right of the arrow, which can make the diagram hard to read.

Thanks!

1 Answer

0 votes
answered Aug 25, 2015 by anonymous

From this post http://plantuml.sourceforge.net/qa/?qa=742/is-it-possible-to-put-the-text-on-the-left-side-of-the-arrow it seems that it is not possible (yet) to do what you want.

I do not know if it applies to your diagram, but I added a couple of \n in order to have the two strings horizontally misaligned:

@startuml
[*] --> Initialization
Initialization --> Acquisition
Acquisition --> Acquisition : acquisition running
Acquisition : very very very very very long text
Acquisition --> Saving : acquisition period ends\n
Saving: very very very very very long text
Saving --> Acquisition : \nacquisition restarts
@enduml

...