Sequence diagram: is it possible to put message text next to (not above) a self-message?

0 votes
asked Feb 3, 2021 in Question / help by anonymous
In a sequence diagram, is it possible to put the message text next to (i.e. to the right of) a self-message (i.e. a message/call to oneself)?

Context: I want to put a sequence diagram in a presentation slide. The diagram is a bit too tall to fit in a slide, and need to be scaled down significantly to fit. If it is possible to put the message text of self-messages next to (instead of above) the arrow line, the height of the diagram can be reduced (and the diagram won't need to be shrunk as much).

1 Answer

0 votes
answered Feb 3, 2021 by Martin (6,780 points)

You can get close to it by faking with a note:

(click diagram for source)


On the subject of saving vertical height - do you know that you can have arrows on the same horizontal?  (By using the 'teoz' pragma and then using "&" to combine arrows.

commented Feb 3, 2021 by anonymous
Between the two workarounds, I like the look of the first better. One wrinkle though: After changing the styling of "note", I lose the ability to create the normal kind of notes. I tried changing the styling in the middle my sequence diagram, but it resulted in errors. I also found that both "note" and "rnote" seem to be controlled by the same set of style parameters, so it seems not viable to use rnote for the trick and keeping the styling of note unchanged.

In any case, thanks a lot for the help. If there's a way to use your first trick and still keep the normal-style notes available, that would be great. Any suggestions?
commented Feb 3, 2021 by Martin (6,780 points)

Sorry, I was lazy.  You can use a custom style stereotype to limit the styling to notes of your choice.

(click to view)

commented Feb 5, 2021 by anonymous
I didn't know of the custom style stereotype feature before. Thanks for showing me.