Please provide a skinparam to set a padding in pixels between participants and boxes on sequence diagrams

0 votes
asked Feb 16, 2017 in Closed feature request by anonymous

I'd like to specify a "padding" in pixels between participants and boxes, e.g.

skinparam ParticipantPadding 10
skinparam BoxPadding 20

box "B"
participant Alice
end box

Alice -> Bob : hello

1 Answer

0 votes
answered Feb 16, 2017 by plantuml (265,360 points)
selected Mar 23, 2018 by Anthony-Gaudino
Best answer

Thanks for the suggestion.

We like the idea of adding padding option, so here is a new beta:

This beta works with the following diagram:

skinparam ParticipantPadding 10
skinparam BoxPadding 20

box "B"
participant Alice
end box

Alice -> Bob : hello

This kind of modification is quite easy to do (when you are used to PlantUML code...), so we did it directly.
The setting can be set in pixel only (which is consistent other values).

Other padding settings may be implemented on demand, so please ask!


commented Feb 20, 2017 by anonymous
The final solution works perfectly !
Cheers ... Helmut
commented Sep 22, 2018 by grocky
Was this rolled out? In 1.2018.10 I don't see these parameters, but I would like to use them!

$> plantuml -language | grep -i pad

$> plantuml -version
PlantUML version 1.2018.10 (Sat Aug 25 13:02:59 EDT 2018)
(GPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 10.0.1+10
Operating System: Mac OS X
OS Version: 10.13.6
Default Encoding: UTF-8
Language: en
Country: US
Machine: 8c8590c5b0ee
Processors: 8
Max Memory: 4,294,967,296
Total Memory: 268,435,456
Free Memory: 260,590,040
Used Memory: 7,845,416
Thread Active Count: 1

The environment variable GRAPHVIZ_DOT has been set to /usr/local/opt/graphviz/bin/dot
Dot executable is /usr/local/opt/graphviz/bin/dot
Dot version: dot - graphviz version 2.40.1 (20161225.0304)
Installation seems OK. File generation OK
commented Sep 22, 2018 by plantuml (265,360 points)
It is.
We just have to update the -language output.
BTW graphviz 2.40.1 has issues with PlantUML. You may consider downgrade to 2.38
commented Oct 21, 2021 by Aleksander Adamowski

Would it be possible to implement padding for packages in component diagrams? It doesn't seem to be settable on packages in general or on individual packages - only globally on all elements through "skinparam Padding".

Also, when I set padding globally through "skinparam Padding" - it gets applied to packages, but there seems to be a bug where only top and bottom padding gets applied, but not on the sides of the package.

And there's another bug where packages aren't properly padded to accommodate interface text label, e.g. with this example:


package "Application process" {

  component [Application] as Application

  interface "Some API" as API1
  [Some provider] as Provider

  API1 - Provider
  Application --> API1



The result looks like this: (note how SomeAPI overflows on the left side)