Placing a note as legend

+1 vote
asked Jun 5, 2013 in Wanted features by koppor (160 points)
recategorized Jun 5, 2013 by koppor

In a class diagram, I want to have a note placed on the lower right corner. When using "note", the note is placed on the top of the page. By chaning position in the plantuml input, I can only say whether it is placed left or right of the first note. I would love to see a possibility to put some kind of legend into a diagram.

1 Answer

+1 vote
answered Jul 1, 2013 by plantuml (294,960 points)

Hello,

Version 7970 supports this: http://plantuml.sourceforge.net/classes.html#Legend

@startuml
class Foo
legend right
  dummy
endlegend
@enduml

Feedback appreciate....

asked Jul 4, 2013 in Wanted features by anonymous legend also in sequence diagrams?
commented Jul 17, 2013 by plantuml (294,960 points)
This is implemented in V7972

http://plantuml.sourceforge.net/sequence.html#Legend

Regards,
commented Jul 25, 2013 by koppor (160 points)
Looks good. If the diagram should look smaller, in my case, the legend could be placed at the top right corner and arrows routed accordingly around the legend. - In the current rendering, the legend seems to be placed just below the lowest box (at the legend area) and thus, more total white space is used in the diagram.

Is it possible to use a SkinParameter such as "LegendBackgroundColor White"?
commented Jul 30, 2013 by plantuml (294,960 points)
Yes, you can do:

@startuml
skinparam LegendBackgroundColor yellow
skinparam LegendBorderColor red

Bob -> Alice : hello
legend
foo
endlegend
@enduml

(not documented yet)
commented Oct 15, 2013 by anonymous
This isn't working for me... confirmed I'm running version 7982.  I keep getting "syntax error" on "legend right".
commented Oct 15, 2013 by plantuml (294,960 points)
This is strange... This is working on the online server:

http://plantuml.com/plantuml/form?url=NSkx3O0m34NHtbDu0HQWG09QbWY9IQAO63aWnFPyqb6-g_DAYdapQbQSo5DsWx79gnpPZSAYU16pd53-JDIHLgBa00QPiUcmvsW9Mmpl3VYpgD677HOHU5PjDm00

Could you double (triple?) check your version:
@startuml
version
@enduml

And give us the diagram you are testing ?

Thanks,
commented Oct 15, 2013 by anonymous
the problem has to be me then... i'll dig deeper.  thanks for the quick response.
...