WBS Node Styles in Legend

0 votes
asked Dec 10, 2023 in Question / help by anonymous
I've got a relatively complicated WBS diagram, detailing an organisational structure, where I use a combination of BackgroundColor, FontColor, LineColor and LineStyle to illustrate attributes like a persons location, permanent or outsource staff, whether they are present in another hierarchy, etc.

It would be great to show this in the legend, but all attempts so far have failed. Ideally, I would should a fully rendered node (smaller size) in the legend, but that may be asking too much.

Any thoughts?

1 Answer

0 votes
answered 6 days ago by dickmaley (4,020 points)

This example could possibly help.

image

@startuml banking-context
title PoC for Architecture as Code
'LIBRARIES
!include <C4/C4_Context>

'Border colors for systems
AddElementTag("updatedSystem", $borderColor="orange" )
AddElementTag("newSystem", $borderColor="green")
AddElementTag("existingSystem", $borderColor="red")

'Interactions - Updated, New, Emphasized
AddRelTag("updatedInterface", $textColor="orange", $lineColor="orange", $lineStyle = DashedLine())
AddRelTag("newInterface", $textColor="green", $lineColor="green", $lineStyle = dotted)
AddRelTag("EmphasizeInterface", $lineStyle = "boldLine")

Person(customer, "Primary Customer")
System(bankingApp, "Banking App", "Customer Bank Interface", $tags="existingSystem")

Rel(customer, bankingApp, "Make Transaction")
Rel(customer, bankingApp, "Update Profile", "http")

Person_Ext(addOnCustomer, "Add On Customer")
Rel(addOnCustomer, bankingApp, "Read Transaction", "https", $tags="EmphasizeInterface")

System_Ext(email, "Email System", "Email Notification System", $tags="newSystem")
Rel(bankingApp, email, "Post", "http", $tags="newInterface")

System_Ext(las, "LAS", "Logging And Analytics System", $tags="updatedSystem")
Rel(bankingApp, las, "Post", "http", $tags="updatedInterface")

SHOW_LEGEND()

@enduml

...