Any way to specify arrow head/tail labels?

+2 votes
asked Nov 22, 2017 in Wanted features by Nick
edited Nov 22, 2017

Is there a way to specify the equivalent of Graphviz's headlabel/taillabel? I'd like to annotate the arrows on a sequence diagram with line numbers underneath, for the source/destination.

commented Nov 23, 2017 by R.M.Sluimers (100 points)
I second this request.
The best workaround I can figure out is to use '\n' newlines for the label.

1 Answer

0 votes
answered Nov 23, 2017 by plantuml (294,960 points)

You can also have

@startuml
class foo
class dummy
foo "1" -- "*" dummy : contains
@enduml

http://www.plantuml.com/plantuml/uml/Iyv9B2vMIClFvqe6ir9AStChkO1y1IL39GLTNGKbBIM8e8ALGd9-NabYPbun0000

Is this what you are looking for ?

commented Nov 24, 2017 by Nick
That would be exactly what I was looking for, except doesn't seem to work on sequence diagrams: http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuIe0qfd9cGM9UIKAQVdvAFoKqjpSIYwWg8AIePA2hfs2afOIH531IY4vFwyaCJElcCiXDGyebWC0
commented Nov 24, 2017 by R.M.Sluimers (100 points)
And here I thought that this is what you had in mind:

@startuml
class foo
class dummy
foo "1" -- "0..*" dummy : foo\n\ndummies
@enduml

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuKhEIImkLaZBpuUoKafpSokvW7m59KCb1LrT1IK3FJqj9OYuWXL8PKnUJ1w8cvbQpEMG2cBc0000
...