plantuml / plantuml

Generate diagrams from textual description
https://plantuml.com
Other
9.73k stars 881 forks source link

nwdiag: can't change nodes background color #1224

Closed dgutson closed 1 year ago

dgutson commented 1 year ago

I can't find any relevant documentation, I'm trying everything I find/imagine and nothing works:

@startuml
nwdiag {
    network nw {
         a [backgroundcolor = "blue", color = "blue"];
         b;
    }
}
@enduml

Please help. Thanks.

The-Lum commented 1 year ago

Hello @dgutson, and all,

See this similar request here:

And just FYI, see also:

If that can help, Regards.

dgutson commented 1 year ago

@The-Lum do I understand correctly if:

?

The-Lum commented 1 year ago

@dgutson: Yes, you are absolutely right.

  1. That is a wanted feature not yet implemented, you can vote on it and add a +1... to confirm to the PlantUML team, that this feature is requested also for you...
  2. currently style is global, perhaps ask to allow stereotype on nwdiag for that...

Regards.

The-Lum commented 1 year ago

Awaiting the wanted feature implementation, here is a temporary workaround, with creole, as:

@startuml
scale 1.5
nwdiag {
    network nw {
         a [description = "<back:blue><color:red>  a  "];
         b [description = "<#blue>|<color:red>  b  |"];
         c;
    }
}
@enduml

Enjoy, Regards.

dgutson commented 1 year ago

Thanks @The-Lum ,it's clever. We will probably use nwdiag and add it the cylinder shape, or add this feature to plantuml. We'll see. Seems shorter enhancing nwdiag, which already has the background feature.

arnaudroques commented 1 year ago

This should be fixed in V1.2023.0. See this example.

Hope this helps!

dgutson commented 1 year ago

@qequ watch!!

The-Lum commented 1 year ago

Issue Review (with Happy resolution 2023: see Issue tracking [FYI @BenceSzalai]):

Thanks a lot everybody for your contribution.

dgutson commented 1 year ago

Thanks!