Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

hide stereotype in component diagrams

+3 votes

I need to have the hide stereotype feature in component diagram as well, in priority. (but in all diagram would be great).

Because as I understood it, this is the only way to have some graphics get a particulary skin params like background, font size. I maybe wrong. And in that case << XXX >> is visible in the component.

thank you
asked Mar 12, 2014 in Wanted features by taharqa (310 points)
hide stereotype in all diagrams
I've same issue in object diagram but that work in class diagram

thank you

1 Answer

+1 vote
Best answer

Ok, so with the last beta:

You can have:

hide stereotype
show <<shared lib>> stereotype

[AA] <<static lib>>
[BB] <<shared lib>>
[CC] <<static lib>>

node node1
node node2 <<shared node>>
database Production
database Production2 << indus >>

skinparam component {
    backgroundColor<<static lib>> DarkKhaki
    backgroundColor<<shared lib>> Green

skinparam node {
    borderColor Green
    backgroundColor Yellow
    backgroundColor<<shared node>> Magenta
skinparam databaseBackgroundColor Aqua


answered Mar 12, 2014 by plantuml (125,210 points)
selected Mar 12, 2014 by taharqa
it was fast and it is working as expected...
It was not asked originally but can you make this also work for package,node, folder, frame, cloud, database ?
The last beta should include this :
Very few tests have been done, so do not hesitate to give feedback
Great ! it works as expected , and on all my diagram I do not see any regression. Thank you for your action!
Thanks for the hide-by-stereotype feature!

I have two comments. The first one is informational: a "show/hide" statement cannot be placed in a skinparam compound, and there must be a space after the "hide" keyword:

skinparam component {
    backgroundColor<<hidden_st>> Yellow
        hide <<hidden_st>> stereotype

However the following works fine:

skinparam component {
    backgroundColor<<hidden_st>> Yellow
hide <<hidden_st>> stereotype

The second comment is a side effect. The hide statement hides other stereotypes, but only if they are a "component" and they contain something:

hide <<hidden_st>> stereotype
component AA <<st_non_empty>> {
component BB_ok <<st_empty>>
component HH <<hidden_st>>

I would also like this feature to be added to all diagrams.
Support This Project Offer 250 Mo! Follow PlantUML on Twitter