Skip to content

How to create diagrams

Mermaid Diagrams

Mermaid project

Graphs

```mermaid
graph LR;
A-->B;
A-->C;
B-->D;
C-->D;
```
graph LR; A-->B; A-->C; B-->D; C-->D;

Sequence diagrams

```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
    John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts <br/>prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!

Class diagrams

```mermaid
 classDiagram
  Animal <|-- Duck
  Animal <|-- Fish
  Animal <|-- Zebra
  Animal : +int age
  Animal : +String gender
  Animal: +isMammal()
  Animal: +mate()
  class Duck{
      +String beakColor
      +swim()
      +quack()
  }
  class Fish{
      -int sizeInFeet
      -canEat()
  }
  class Zebra{
      +bool is_wild
      +run()
  }
```
classDiagram Animal <|-- Duck Animal <|-- Fish Animal <|-- Zebra Animal : +int age Animal : +String gender Animal: +isMammal() Animal: +mate() class Duck{ +String beakColor +swim() +quack() } class Fish{ -int sizeInFeet -canEat() } class Zebra{ +bool is_wild +run() }

Large example

graph LR; GeoLibs --> GeometricPreprocessing; GeoLibs --> SimStadtDataModel; GeoLibs --> DistrictHeatingNetwork; GeometricPreprocessing --> MonthlyEnergyBalance; EnergyADEPlugin --> GeometricPreprocessing; EnergyADEPlugin --> SimStadtDataModel; EnergyADEPlugin --> BuildingEnergyLibs; InterfaceTools --> HierarchicWorkflow; InterfaceTools --> DistrictHeatingNetwork; InterfaceTools --> SimplifiedRadiosityAlgorithm; InterfaceTools --> BuildingEnergyLibs; HierarchicWorkflow --> SimStadt; SimStadt --> SimStadtWorkflowsEnergy; SimStadt --> SimStadtDesktop; SimStadt --> SimStadtWorkflowsEmTool; SimStadt --> ShadowProcessing; SimStadt --> SimStadtWorkflowsLoadProfile; BuildingEnergyLibs --> MonthlyEnergyBalance; WeatherProcessing --> MonthlyEnergyBalance; WeatherProcessing --> IrradianceProcessing; DistrictHeatingNetwork --> SimStadtWorkflowsEnergy; SimulationPlugins --> WeatherProcessing; SimulationPlugins --> DistrictHeatingNetwork; IrradianceProcessing --> SimplifiedRadiosityAlgorithm; SimStadtDataModel --> SimplifiedRadiosityAlgorithm; SimStadtDataModel --> MonthlyEnergyBalance; SimplifiedRadiosityAlgorithm --> SimStadt; MonthlyEnergyBalance --> SimStadt; ShadowProcessing --> SimStadtWorkflowsShadowing; FinancialAnalysis --> SimStadt;