Sequence Diagram : Note with image and multiline text beside image

0 votes
asked Sep 27, 2023 in Question / help by PH
Dear developper,

Is there a way, in a sequence diagram, to put one single image and multiple line text beside ?

IMAGE  text line 1

IMAGE  text line 2

IMAGE  text line 3

Thanks.

1 Answer

0 votes
answered Sep 27, 2023 by The-Lu (89,080 points)

Hello P., and all,

For that you can use table (and funny operator `\n\`) as:

@startuml
Alice->Bob : hello
note left
|<img:http://plantuml.com/logo3.png>| a note \n\
 can also be defined \n\
 on several lines and on a table|
end note
@enduml

Enjoy,
Regards,
Th.

commented Sep 28, 2023 by anonymous
Thanks for answer ;-)

Nice solution,

Managed to have white line on notes outline, but

 any way to have transparent or white table lines ?

Thanks
commented Sep 28, 2023 by The-Lu (89,080 points)

Hi all,

For:

 any way to have transparent or white table lines ?

You can put at the begin of the table:

<#transparent,#transparent>

See also:

Enjoy,
Regards,
Th.

commented Sep 29, 2023 by anonymous
Thanks.

Is it possible to fix columns width of tables (varies depending text),

in order to obtain alignement when having multiple note with tables.

Example :

@startuml
Alice->Bob : hello
note left
|<img:http://plantuml.com/logo3.png>| a note \n\
 can also be defined \n\
 on several lines and on a table|
end note

note left  of Alice
|<img:http://plantuml.com/logo3.png>| another \n\
 note \n\
 size|
end note

@enduml

Would like to have the two images and texts aligned ...

Thanks
commented Oct 1, 2023 by The-Lu (89,080 points)

Hello P., and all,

From:

To align note width,
If the size of the image are the same, you can add on last line of the last cell a dummy space, as:

@startuml
!$maxTableCell="                                           "

Alice->Bob : hello

note left
|<img:http://plantuml.com/logo3.png>| a note \n\
 can also be defined \n\
 on several lines and on a table\n\
 ""$maxTableCell""|

end note

note left  of Alice
|<img:http://plantuml.com/logo3.png>| another \n\
 note \n\
 size\n\
 ""$maxTableCell""|
end note

@enduml

Enjoy,wink
Regards,
Th.

commented Oct 5, 2023 by P.H.
edited Oct 14, 2023
Thanks for the tip ;-)

Any way to align text inside table to right side ?

Would be nice to support \r and \l into table cells like

here https://forum.plantuml.net/3055

Thanks
...