-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tag (=additional stereotype) support, that e.g. specific characteristics can be added to an element #102
Comments
Hi, while I understand the need to add custom colors and entities to a C4 Diagram, I think that adding another parameter to the @startuml
!include https://raw.githubusercontent.com/adrianvlupu/C4-PlantUML/latest/C4_Container.puml
skinparam database<<fallback>> {
FontColor #404040
BackgroundColor #c0c0c0
}
!unquoted procedure FallbackDatabaseContainer($alias, $label, $techn, $descr="", $sprite="")
database "$getContainer($label, $techn, $descr, $sprite)" <<fallback>><<container>> as $alias
!endprocedure
FallbackDatabaseContainer(db2, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.")
@enduml This is not perfect either because it doesn't show up in the legend but I think it's worth adding stuff like this in the docs. What do you think? |
Hi, I also didn't like an additional argument, but then I found the "keywords arguments" and think that the additional argument would not complicate the diagram anymore as long it is not used. And if they are used its only additional argument (without empty placeholder). - this I wouldn't like too
System(s2, "S2", "", "", "fallback")
ContainerDb(db2, "backup db", "Oracle", "", "", "fallback")
- but this I think is ok
System(s2, "S2", $tags = "fallback")
ContainerDb(db2, "backup db", "Oracle", $tags = "fallback") In some architectures I used e.g. 2 identically databases and "fallback" is only a time dependen role. And therefore I would prefer that I can model it with the same elements. The internal implementation should be simple and not the problem. |
…om tags/stereotypes support; dynamic legend supports custom colors, border and shadow; dynamic legend displays (only) used elements, tags/stereotypes. New added macros: SHOW_DYNAMIC_LEGEND(), AddTagSupport(), UpdateSkinparamsAndLegendEntry(), elements macros are extended with $tags="..."
…om tags/stereotypes support; ... (2 - update macros docu with added $tags="...")
@adrianvlupu can you please review my PR #107? I think the functionality itself is ok. Maybe you have better names for concrete macros,... |
In some diagrams I want to display additional details (e.g. component is part of failover) with a different color.
PlantUML supports multiple stereotypes, and I would add for the tag an additional stereotype.
E.g. all element are extended with a tag argument
E.g. the "C4_Deployment Diagram Sample - bigbankplc" has a second DB which is part of failover (this DB is marked with the tag "fallback"). It could be modelled like
and the output would look like
I don't know if it can be realized in all scenarios (I have to check it) but could try it.
The text was updated successfully, but these errors were encountered: