Can I display diamond name in class diagram?

0 votes
asked Dec 18, 2025 in Question / help by st33v3
In class diagram diamonds are used to represent n-ary associations. In UML the association can be named and the name is displayed above or beside the diamond. Is it possible to do that in PlantUML? All my attempts to display diamond name failed.
All diamond examples I have seen name the diamond, but the name is not visible in the diagram.

1 Answer

0 votes
answered Dec 18, 2025 by The-Lu (86,860 points)

Hi S.,

Could you test:

@startuml
class A
class B

A --* "diamond name" B
@enduml

Regards,
Th.

...