-
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 custom stereotypes #51
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, You can create your own stereotypes outside of C4-PlantUML @startuml
!include https://raw.githubusercontent.com/adrianvlupu/C4-PlantUML/latest/C4_Container.puml
skinparam rectangle<<missing_container>> {
StereotypeFontColor $ELEMENT_FONT_COLOR
FontColor $ELEMENT_FONT_COLOR
BackgroundColor $CONTAINER_BG_COLOR
BorderColor $CONTAINER_BORDER_COLOR
}
!unquoted procedure Missing($alias, $label, $techn, $descr="", $sprite="")
rectangle "$getContainer($label, $techn, $descr, $sprite)" <<missing_container>> as $alias
!endprocedure
Missing(missing_app, "Web APplication", "C#", "Description text")
Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA")
@enduml |
…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="...")
@Riduidel: I think my PR #107 should solve your requirements. You could check it via my local branch https://github.com/kirchsth/C4-PlantUML. @startuml
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Container.puml
AddTagSupport("v1.0", $borderColor="#d73027")
AddTagSupport("v1.1", $fontColor="#d73027")
Person(user, "Customer", "People that need products")
Person(admin, "Administrator", "People that administrates the products via the new v1.1 components", $tags="v1.1")
Container(spa, "SPA", "angular", "The main interface that the customer interacts with via v1.0", $tags="v1.0")
Container(spaAdmin, "Admin SPA", "angular", "The administrator interface that the customer interacts with via new v1.1", $tags="v1.1")
Container(api, "API", "java", "Handles all business logic (incl. new v1.1 extensions)", $tags="v1.0+v1.1")
ContainerDb(db, "Database", "Microsoft SQL", "Holds product, order and invoice information")
Rel(user, spa, "Uses", "https")
Rel(spa, api, "Uses", "https")
Rel_R(api, db, "Reads/Writes")
Rel(admin, spaAdmin, "Uses", "https")
Rel(spaAdmin, api, "Uses", "https")
SHOW_DYNAMIC_LEGEND()
@enduml Best regards |
I would like to add custom stereotypes to
Container(...)
but the current syntax don't allow that.My precise use case is two-fold : I have deployment diagrams built with Structurizr-plantuml and I would like to highlight
<missing>
containers)How can I do that if I can't put a stereotype and have a custom rendering done with
skinParam
?The text was updated successfully, but these errors were encountered: