Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

IS there a possiblity to align the text over the arrow for example to be aligned centered

+1 vote
Pleae consider the below example

@startuml

a -> b : very long message so it will have many new lines as \n and \n and \n

b-> a : another very long message \n so we need to align the text centered

@enduml
asked Jan 23, 2013 by anonymous

2 Answers

+1 vote

Maybe it's not exactly what you are looking for, but you can have this:

@startuml
skinparam SequenceMessageAlign center
a -> b : very long message so it will have many new lines as \n and \n and \n
b-> a : another very long message \n so we need to align the text centered
@enduml

answered Jan 23, 2013 by plantuml (125,190 points)
But this aligned the text as a whole over the arrow which is useful by the way but I want to align the text it self as centered, can't it be a required featured to be implemented next release?
This has been implemented in release 7953. Enjoy!
Can you say how it's been implemented?  Sorry I know this is an old post but I can't find this anywhere.
Thank you!  Did the trick.
Actually, I see now that this changes the alignment for the entire diagram.  I was looking to selectively change the text alignment depending on the arrow.  For full disclosure, i'd like text over -> to be left aligned, and text over <- to be right aligned, and I have several of each.
Ok. This is not possible yet.
We will implement a new setting:

skinparam SequenceMessageAlign direction

that does what you are expecting

And also a skinparam SequenceMessageAlign reserveDirection that does the opposite.

This will be available in next beta (in a week or two). We'll post a message here when ready.

Thanks for the suggestion!
0 votes

With last beta:
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can have:

@startuml
skinparam SequenceMessageAlign direction
Alice -> Bob : hello
return ok
@enduml



or

@startuml
skinparam SequenceMessageAlign reverseDirection
Alice -> Bob : hello with long text
Alice -> Bob : hello
return ok
@enduml


Is this what you are expecting ?
Thanks
 

answered Oct 7, 2016 by plantuml (125,190 points)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...