Center text in activity diagram.

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

1 Answer

0 votes
answered Apr 25 by plantuml (134,510 points)
Ok, could you provide a short example? It would be easier to better understand the need.

Thanks!
commented Apr 26 by ddecock (140 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
commented Apr 26 by plantuml (134,510 points)
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
commented Apr 26 by ddecock (140 points)
Hi,

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

Kind regards,
Dries
commented Apr 26 by plantuml (134,510 points)
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
commented Apr 27 by ddecock (140 points)
Hi,

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

Thanks!
...