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.

Center text in activity diagram.

0 votes
I would like to center the text on arrows in an activity diagram Now it is always alligned with the starting activity.
asked Apr 25 in Wanted features by ddecock (140 points)

1 Answer

0 votes
Ok, could you provide a short example? It would be easier to better understand the need.

Thanks!
answered Apr 25 by plantuml (126,850 points)
Hi,

this is an example:

@startuml
skinparam arrow {
    MessageAlign center
}

|Customer|
|Sales|
:**SEND** report
to customer;
->in big envelop;
|Customer|
:**RECEIVE** report;
-> by mail;
|Sales|
:**RECEIVE** ack;
@enduml


The expected outcome would be that the text is horizontally center above the arrows so it is easier to see the conversation.

Thanks!
Dries
Ok, understood. Thanks for the example
One more question: do you expect label to be centered also in the following diagram:
@startuml
skinparam arrow {
    MessageAlign center
}

:**SEND** report
to customer;
->in big envelop;
:**RECEIVE** report;
-> by mail;
:**RECEIVE** ack;
@enduml
Hi,

do you mean the activity labels, like "SEND report"? I don't, this should be a different skin parameter.

Kind regards,
Dries
No, I'm talking about "in big envelop" and "by mail" labels.

I am just wondering if the 3 following diagrams should be rendered differently or not:

@startuml
skinparam arrow {
    MessageAlign center
}

:**SEND** report
to customer;
->in big envelop;
:**RECEIVE** report;
-> by mail;
:**RECEIVE** ack;
@enduml

@startuml
skinparam arrow {
    MessageAlign left
}

:**SEND** report
to customer;
->in big envelop;
:**RECEIVE** report;
-> by mail;
:**RECEIVE** ack;
@enduml

@startuml
skinparam arrow {
    MessageAlign right
}

:**SEND** report
to customer;
->in big envelop;
:**RECEIVE** report;
-> by mail;
:**RECEIVE** ack;
@enduml
Hi,

yes, I would expect 3 different renders. Would that be possible?

Thanks!
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...