Support for Component constant width

0 votes
asked Jul 10, 2019 in Wanted features by diagramBob (220 points)


I am trying to PlantUML-ize some big diagrams and face the challenge of such diagram:

I noticed that Class width works well. Was proposed here:

Proposal: Would be great to use similar approach for Component.  The support for stereotypes would make it super flexible and minimize the impact to existing codebase as well.

My diagram with proposal is below.
Classes look cool with similar size, Would be great to have components laid out same sizes too ! 



skinparam nodesep 10

skinparam ranksep 10

skinparam sameClassWidth true

skinparam minClassWidth 300

skinparam component {

    'sameComponentWidth<<EXT>> true

    'minComponentWidth 300


class a 

class thisisverylong 

a -[hidden]- thisisverylong

rectangle "EXTERNAL SERVICES" <<EXT>> as ext {

component "Oath"

component "UUID"

    component "IP validation"

    component "SMS Gateway"

    component "Payment gateway"

    component "Email gateway"


thisisverylong -[hidden]- ext


1 Answer

0 votes
answered Jul 10, 2019 by plantuml (241,480 points)
That's a nice suggestion.

We are currently working on adding styles on PlantUML. This would allow to overcome some actual limitations with skinparams.


So your need will be taken in this new style feature.
commented Jul 10, 2019 by diagramBob (220 points)

Thanks for fast response! 

I went though the referred style page..  Looks nice addition indeed !

+ one comment about Components Height 
The common feature in Some legacy tools is to provide instructions that 
"Please render some components at same width and height" so they look nice on autolayout as well.

In Deployment diagrams, the components often do not have many details within, especially on High Level Architecture diagrams that specify only significant list of details.

So, something like this would be nice: 

sameComponentWidth true
minComponentWidth 300

sameComponentHeight true
minComponentHeight 300

I am happy to create some pretty realistic examples with many details for styling tests.

Several layout features could fit into the styles concept as well, in backward compatible mode.