Trying to merge cells in a table in a Sequence Diagram?

0 votes
asked Feb 2, 2021 in Question / help by schmidtjano (240 points)
edited Feb 2, 2021 by schmidtjano

Hello!

I have a table in a note in a sequence diagram and am trying to make a longer header span across all the columns so that the first column is not a wide as the header text. I know that an asterisk can accomplish this in a Salt Diagram, but this does not work in my sequence diagram. Please see rows 1 and 11 below:

PlantUML diagram
 

@startuml
skinparam style strictuml
group #whitesmoke Test
A -> B ++ #green : Tell me a secret please.
return Here you go.
note right #white

<#whitesmoke,#red>| <size:14><b>This is a Very Long Header</b> | * | * |
| <b><size:10>DATA ELEMENT | <b><size:10>SOURCE | <b><size:10>VALUE |
| segmentId | OS | TMH |
| segmentVersion | OS | 01 |
| deviceAlias | VVV |  |
| deviceSession | WWW |  |
| ediName | XXX |  |
| ediVersion | YYY |  |
| ediTime | ZZZ |  |
| | | |
<#whitesmoke>| <size:14><b>This is a Another Very Long Header</b> | * | * |
| <b><size:10>DATA ELEMENT | <b><size:10>SOURCE | <b><size:10>VALUE |
| segmentId | OS | TMF |
| segmentVersion | OS | 01 |
| anotherDataElement | UUU |  |
end note
end group
@enduml

Is there a way to accomplish what I am trying to do in sequence diagrams?

Many thanks in advance!

JOS

1 Answer

+1 vote
answered Feb 2, 2021 by The-Lu (67,000 points)

Hello J.,

See a similar Question/Answer here:

And the Martin's answer:

PlantUML standard tables seem to be very basic and not support cell merging.  The tables in SALT do support cell merging (you place a * in the cells to the right), however they don't support centred text, so the result isn't great.

The best option I can come up with is to embed a graphviz html node into your title [or note]

If that can help,
Regards,
Th.

...