Skip to content
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

Notes element #189

Closed
Ramin2c opened this issue Oct 1, 2021 · 2 comments
Closed

Notes element #189

Ramin2c opened this issue Oct 1, 2021 · 2 comments
Labels
question Further information is requested

Comments

@Ramin2c
Copy link

Ramin2c commented Oct 1, 2021

Hello
There are times when a designer needs to write an extra description but not within an element on the diagram. It would be very nice then to be bale to write notes or comments in a separate box and attach to any element like container, system or even relations.
I have looked around in the forums and looks like this is not supported yet by the PlantUML.

Best Regards
Ramin Toussi

@kirchsth
Copy link
Contributor

kirchsth commented Oct 1, 2021

Hello @Ramin2c

C4-PlantUML has no special note support, but there are some note features in plantuml itself

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

' change note style
' https://plantuml-documentation.readthedocs.io/en/latest/formatting/all-skin-params.html#note
skinparam NoteBorderColor lightgray
skinparam NoteBackgroundColor darkgray
skinparam NoteFontColor white

Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")

Rel(personAlias, containerAlias, "Label", "Optional Technology")
' define a note after a relation
' https://forum.plantuml.net/7855/notes-on-arrow
note on link
  this is a note
end note

' define a note relative to a component
' https://plantuml.com/en/component-diagram#d50d8f9219a41435
note right of personAlias
First line
        second line (indented)
        third line (indented)
Last line
end note

' define a floating note
note as AFloatingNoteAlias
A floating note
end note

' assigne a note to a component via Lay_*
note as ANoteAlias
ANote line
        second line (indented)
        third line (indented)
Last line
end note

Lay_U(ANoteAlias, systemAlias)
@enduml

I hope it helps
BR Helmut

@Ramin2c
Copy link
Author

Ramin2c commented Oct 3, 2021

Hi
Thanks for the answer. This is what I've been after :)

Bests
Ramin

@Ramin2c Ramin2c closed this as completed Oct 3, 2021
@Potherca Potherca added the question Further information is requested label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

3 participants