Reputation: 5384
Have created a sequence diagram using PlantUML generating containing a legend and footer.
The footer contains my company's name along with copyright date.
The legend is very close to the footer and I need to insert a new line (or a <br>
or a <p>
) in between the legend and footer. Also, my caption seems to have a large space in between the caption and legend.
My puml DSL file:
@startuml
skinparam Shadowing false
title __Dating API Sequence Diagram__\n
caption \nVersion 1.0 - 6/26/2020 (Draft)\n
autonumber
activate DatingApp
DatingApp -> DatingRestController: hitExternalApi()
activate DatingRestController
DatingRestController -> DatingService: processService()
activate DatingService
DatingService -> DatingService: findProfile()
activate DatingService #90EE90
DatingService -> DatingService: doSomething()
DatingService -> DatingService: doSomethingElse()
deactivate DatingService
DatingService -> DatingRestController: return retValue
DatingRestController -> DatingApp: jsonPayload
deactivate DatingRestController
deactivate DatingApp
legend bottom right
Legend
|=Color |= Name |= Type |= Lifeline |
|<back:#FFFFFF> </back>| DatingApp.hitExternalApi() | method | default |
|<back:#FFFFFF> </back>| DatingRestController.processService() | method | default |
|<back:#FFFFFF> </back>| DatingService.findProfile | method | default |
|<back:#90EE90> </back>| DatingService.doSomething() | method | nested |
|<back:#90EE90> </back>| DatingService.doSomethingElse() | method | nested |
endlegend
center footer MyCompany.com (c) 2020
@enduml
Here's the generated diagram from IntelliJ IDEA:
Question(s):
How to reduce the excessive space with the caption and legend (tried putting an <hr>
but got an error inside IntelliJ IDEA as a workaround)?
How to create horizontal lines (using <hr>
) inside my sequence diagram to denote different sections?
How to place a new line break or <p>
or \n
in between the legend and footer?
Upvotes: 7
Views: 22290
Reputation: 59
I use |||
. This generates a vertical space, similar to a <br>
in HTML.
Upvotes: 5
Reputation: 1169
I don't know the answer to your questions 1 and 3 but you have two options for question 2: So-called "Dividers" or groups.
Here is the example from the PlantUML manual:
== Initialization ==
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
== Repetition ==
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
You can also draw a box around one part of your diagramme and add a custom label to it, although people might mix the box up with combined fragments (alt
, opt
etc.).
Alice -> Bob: Authentication Request
group My own label
Bob -> Alice: Authentication Accepted
Alice -> Bob : Another request
Bob -> Alice: Another answer
end
Alice -> Bob : and so forth
Upvotes: 0