Please provide a skinparam to change the border style of a rectangle

+1 vote
asked Jun 7, 2017 in Closed feature request by newportg (180 points)

I would like to change the border style of a rectangle within a skinparam block.

I've tried this, but it doesn't work.

skinparam rectangle {
    BorderColor<<Software System>> ##[dashed]Green
}

1 Answer

0 votes
answered Jun 10, 2017 by plantuml (294,660 points)
selected Mar 23, 2018 by Anthony-Gaudino
 
Best answer

Right now,  you cannot define dashed rectangle. This only applies to links.

The only setting available beside colors is "round corner".

Working example:

@startuml
skinparam rectangle {
    BorderColor Blue
    BorderColor<<Software System>> Green
    RoundCorner<<Software System>> 25
}
rectangle rect1<<Software System>>
rectangle rect2

rect1 -[dashed]-> rect2
@enduml

http://www.plantuml.com/plantuml/uml/RO-z2i9048JxUufzWHG9s8KZ98MzASLYSTSVlDkLlJj4n7St1a48cMgO-M2OBcMqN69mwNQLEnf6C3vcb7DWU3cOrAiHsw113VfGU1csxQYd_41Z69yfS_GUjiOiCxZJ8ZIe2Q-2pSQztN_nw-eLRe4qRWvggFQ4wS9qgFolw5Xe-lC1

We might improve this in the future, but it's difficult to find a nice syntax. Ideas welcome!

Regards,

commented Nov 30, 2017 by jacy
great job, many thanks, now I can experiment with making some aws diagrams per milo-minderbinder https://github.com/milo-minderbinder/AWS-PlantUML but with the dashed borders people have come to expect.
commented Dec 6, 2017 by bx
Is it possible to apply a dashed border to a single rectangle without the << stereotype >> language appearing in the rectangle?
commented Jan 26, 2018 by Anthony-Gaudino (5,720 points)
Use            hide stereotype         and         show <<my_stereotype>> stereotype
commented Sep 28, 2021 by rd27 (460 points)
borderStyle dashed doesn't seem to be working in recent plantuml versions (e.g. 1.2021.7). Was it actually added to mainline builds?
commented Sep 29, 2021 by The-Lu (63,920 points)

Hello @rd27,

  • What "doesn't seem to be working" ?

For example, here is the output (on v1.2021.11b):

But a better solution nowadays is to use [beta-]style...
Regards,
Th.

...