From a Mermaid class diagram
A class diagram imported from Mermaid. Every Mermaid relation operator, imported as diago relations.






┌────────┐ ┌──────┐ ┌──────┐
│ Shape │ │ Club │ │ Vet │
└────────┘ └──────┘ └──────┘
△ △ ◇ 0..1 │ │
╎ ╎ │ members │ │
┌╌╌╌╌╌╌╌╌╌╌╌┘ ╎ │ │ └────────────────────┐
╎ ╎ │ * │ │
┌────────┐ ┌────────┐ ┌────────┐ ┌──────┐ ┌────────┐ │ ┌────────┐
│ Animal │ │ Circle │ │ Square │ │ Pet │ │ Owner │ │ │ Clinic │
└────────┘ └────────┘ └────────┘ └──────┘ └────────┘ │ treats └────────┘
△ △ keeps ◆ 1 │
│ │ │ many │
│ │ └────────┐ │
│ └─────────────────────┐│ │
└───────────────────────────────────────────────────────────────┐ ││ │
│ ││ ▼
┌──────┐
│ Dog │
└──────┘
◆◇ │ ╎╎
││ │ ╎╎
┌────────────────────────────────┘│ │ ╎└╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐
│ ┌───────────────────┘ │ └╌╌╌╌╌╌╌╌╌╌┐ ╎
│ │ ▼ ▼ eats ▼
┌────────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────────┐
│ Kennel │ │ Toy │ │ Bowl │ │ Food │ │ Groomer │
└────────┘ └──────┘ └──────┘ └──────┘ └──────────┘
Spec
classDiagram Animal <|-- Dog Dog --|> Pet Shape <|.. Circle Square ..|> Shape Owner "1" *-- "many" Dog : keeps Kennel --* Dog Club "0..1" o-- "*" Owner : members Toy --o Dog Vet --> Dog : treats Bowl <-- Dog Dog ..> Food : eats Groomer <.. Dog Vet -- Clinic{ "type": "class", "classes": [ {"id": "Animal"}, {"id": "Dog"}, {"id": "Pet"}, {"id": "Shape"}, {"id": "Circle"}, {"id": "Square"}, {"id": "Owner"}, {"id": "Kennel"}, {"id": "Club"}, {"id": "Toy"}, {"id": "Vet"}, {"id": "Bowl"}, {"id": "Food"}, {"id": "Groomer"}, {"id": "Clinic"} ], "relations": [ {"from": "Dog", "to": "Animal", "kind": "inheritance"}, {"from": "Dog", "to": "Pet", "kind": "inheritance"}, {"from": "Circle", "to": "Shape", "kind": "realization"}, {"from": "Square", "to": "Shape", "kind": "realization"}, { "from": "Owner", "to": "Dog", "kind": "composition", "label": "keeps", "from_card": "1", "to_card": "many" }, {"from": "Dog", "to": "Kennel", "kind": "composition"}, { "from": "Club", "to": "Owner", "kind": "aggregation", "label": "members", "from_card": "0..1", "to_card": "*" }, {"from": "Dog", "to": "Toy", "kind": "aggregation"}, {"from": "Vet", "to": "Dog", "kind": "association", "label": "treats", "directed": true}, {"from": "Dog", "to": "Bowl", "kind": "association", "directed": true}, {"from": "Dog", "to": "Food", "kind": "dependency", "label": "eats"}, {"from": "Dog", "to": "Groomer", "kind": "dependency"}, {"from": "Vet", "to": "Clinic", "kind": "association"} ]}Draw it yourself
diago render mermaid-class.mmd > mermaid-class.svgOpen it in the playground to edit it in your browser.