Comments
Simple comment
Everything that starts with simple quote ' is a
comment.
@startuml 'Line comments use a single apostrophe @enduml
Block comment
Block comment use C-style comments except that instead of * you use an apostrophe ',
then you can also put comments on several lines using /' to start and '/ to end.
@startuml /' many lines comments here '/ @enduml
[Ref. QA-1353]
Then you can also put block comment on the same line, as:
Zoom
You can use the scale command to zoom the generated image.
You can use either a number or a fraction to define the scale factor.
You can also specify either width or height (in pixel).
And you can also give both width and height: the image is scaled to fit inside the specified dimension.
-
scale 1.5 -
scale 2/3 -
scale 200 width -
scale 200 height -
scale 200*100 -
scale max 300*200 -
scale max 1024 width -
scale max 800 height
Title
The title keywords is used to put a title.
You can add newline using \n in the title description.
Some skinparam settings are available to put borders on the title.
@startuml
skinparam titleBorderRoundCorner 15
skinparam titleBorderThickness 2
skinparam titleBorderColor red
skinparam titleBackgroundColor Aqua-CadetBlue
title Simple communication\nexample
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@endumlYou can use link::creole[creole formatting] in the title.
You can also define title on several lines using title
and end title keywords.
Footer and header
You can use the commands header or footer to
add a footer or a header on any generated diagram.
You can optionally specify if you want a center, left
or right footer/header, by adding a keyword.
As with title, it is possible to define a header or a footer on several lines.
It is also possible to put some HTML into the header or footer.
Legend the diagram
The legend and end legend are keywords is used to put a legend.
You can optionally specify to have left, right, top, bottom or center
alignment for the legend.
Appendix: Examples on all diagram
Gantt project planning
@startgantt
header some header
footer some footer
title My title
caption This is caption
legend
The legend
end legend
[t] lasts 5 days
@endgantt[[#98FB98#DONE]] [(Header, footer) corrected on V1.2020.18]
Work Breakdown Structure (WBS)
@startwbs
header some header
footer some footer
title My title
caption This is caption
legend
The legend
end legend
* r
** d1
** d2
@endwbs[[#98FB98#DONE]] [Corrected on V1.2020.17]
Wireframe (SALT)
@startsalt
header some header
footer some footer
title My title
caption This is caption
legend
The legend
end legend
{+
Login | "MyName "
Password | "**** "
[Cancel] | [ OK ]
}
@endsalt[[#98FB98#DONE]] [Corrected on V1.2020.18]
Appendix: Examples on all diagram with style
[[#00CA00#DONE]]
FYI:
* all is only good for Sequence diagram
* title, caption and legend are good for all diagrams except for salt diagram
[[#FFD700#FIXME]] 🚩
* Now (test on 1.2020.18-19) header, footer are not good for all other diagrams except only for Sequence diagram.
To be fix; Thanks
[[#FFD700#FIXME]]
Here are tests of title, header, footer, caption or legend on all the diagram with the debug style:
<style>
title {
HorizontalAlignment right
FontSize 24
FontColor blue
}
header {
HorizontalAlignment center
FontSize 26
FontColor purple
}
footer {
HorizontalAlignment left
FontSize 28
FontColor red
}
legend {
FontSize 30
BackGroundColor yellow
Margin 30
Padding 50
}
caption {
FontSize 32
}
</style>
Appendix: Examples of Mainframe on all diagram
Archimate
@startuml
mainframe This is a **mainframe**
archimate #Technology "VPN Server" as vpnServerA <>
rectangle GO #lightgreen
rectangle STOP #red
rectangle WAIT #orange
@enduml [[#FFD700#FIXME]] 🚩 Cropped on the top and on the left [[#FFD700#FIXME]]
Component, Deployment, Use-Case
[[#FFD700#FIXME]] 🚩 Cropped on the top and on the left [[#FFD700#FIXME]]
Network (nwdiag)
@startuml
mainframe This is a **mainframe**
nwdiag {
network inet {
web01 [shape = cloud]
}
}
@enduml[[#FFD700#FIXME]] 🚩 Cropped on the top! [[#FFD700#FIXME]]