Skip to content

Diagrams Material

FormSyntaxUsage
Mermaidfence mermaidFlowchart, sequence, state, ER, quadrant.
PlantUMLfence plantumlUML via Kroki.
Graphvizfence dot / graphvizGraphes DOT.
D2fence d2Diagrammes D2.
Svgbobfence svgbobASCII vers SVG.
Vegafence vegaSpecification Vega.
EngineReference
MermaidMermaid diagram syntax
KrokiKroki supported diagram types
PlantUMLPlantUML language reference
GraphvizDOT language reference
D2D2 language tour
SvgbobSvgbob project reference
~~~ mermaid
graph LR
  A[Start] --> B{Error?}
  B -->|Yes| C[Debug]
  C --> D[Retry]
  D --> B
  B -->|No| E[Yay!]
~~~
graph LR;
  A[Start] --> B{Error?}
  B -->|Yes| C[Debug]
  C --> D[Retry]
  D --> B
  B -->|No| E[Yay!]
~~~ mermaid
sequenceDiagram
  autonumber
  Alice->>John: Hello John, how are you?
  loop Healthcheck
      John->>John: Fight against hypochondria
  end
  John-->>Alice: Great!
~~~
sequenceDiagram
  autonumber
  Alice->>John: Hello John, how are you?
  loop Healthcheck
      John->>John: Fight against hypochondria
  end
  John-->>Alice: Great!
~~~ mermaid
stateDiagram-v2
  [*] --> Draft
  Draft --> Review
  Review --> Published
  Review --> Draft
  Published --> [*]
~~~
stateDiagram-v2
  [*] --> Draft
  Draft --> Review
  Review --> Published
  Review --> Draft
  Published --> [*]
~~~ mermaid
erDiagram
  CUSTOMER ||--o{ ORDER : places
  ORDER ||--|{ LINE_ITEM : contains
  LINE_ITEM {
    string name
    int quantity
  }
~~~
erDiagram
  CUSTOMER ||--o{ ORDER : places
  ORDER ||--|{ LINE_ITEM : contains
  LINE_ITEM {
    string name
    int quantity
  }
~~~ mermaid
quadrantChart
  title Priorisation des initiatives
  x-axis Faible impact --> Fort impact
  y-axis Faible effort --> Fort effort
  quadrant-1 Gros chantiers
  quadrant-2 Actions rapides
  quadrant-3 A eviter
  quadrant-4 Opportunites ciblees
  Automatiser les tests: [0.82, 0.72]
  Nettoyer le backlog: [0.35, 0.28]
  Add a search engine: [0.74, 0.42]
  Refaire toute la navigation: [0.46, 0.86]
  Documenter les workflows: [0.68, 0.33]
~~~
quadrantChart
  title Priorisation des initiatives
  x-axis Faible impact --> Fort impact
  y-axis Faible effort --> Fort effort
  quadrant-1 Gros chantiers
  quadrant-2 Actions rapides
  quadrant-3 A eviter
  quadrant-4 Opportunites ciblees
  Automatiser les tests: [0.82, 0.72]
  Nettoyer le backlog: [0.35, 0.28]
  Add a search engine: [0.74, 0.42]
  Refaire toute la navigation: [0.46, 0.86]
  Documenter les workflows: [0.68, 0.33]
~~~ plantuml
@startuml
actor User
participant Website
participant API
User -> Website: Open docs
Website -> API: Fetch metadata
API --> Website: Metadata
Website --> User: Render page
@enduml
~~~
@startuml
actor User
participant Website
participant API
User -> Website: Open docs
Website -> API: Fetch metadata
API --> Website: Metadata
Website --> User: Render page
@enduml
~~~ graphviz
digraph G {
  rankdir=LR
  Start -> Build -> Verify -> Publish
  Verify -> Build [label="fix"]
}
~~~
digraph G {
  rankdir=LR
  Start -> Build -> Verify -> Publish
  Verify -> Build [label="fix"]
}
~~~ d2
direction: right

user: User
site: Website
api: API

user -> site: reads docs
site -> api: requests data
api -> site: returns JSON
~~~
direction: right

user: User
site: Website
api: API

user -> site: reads docs
site -> api: requests data
api -> site: returns JSON
~~~ svgbob
+--------+      +--------+
| Client | ---> | Server |
+--------+      +--------+
~~~
+--------+      +--------+
| Client | ---> | Server |
+--------+      +--------+