Eriksen Labs Support
Documentation

Flowcharts: boxes and arrows

v2.10.0Updated

On this page
  1. Shapes
  2. Arrows

A flowchart shows steps and decisions. It is the Flowchart example in the editor.

The first line sets the direction. flowchart LR draws from left to right, and flowchart TD from top to bottom. Prefer TD for anything more than about six steps. Confluence pages are narrow, so tall diagrams read better than wide ones.

Mermaid
flowchart TD
  A[Leave request] --> B{Manager approves?}
  B -->|Yes| C[Book in HR system]
  B -->|No| D[Tell the employee]

Its picture is under How Mermaid text works.

Shapes

WriteTo draw
A[Rectangle]Standard box
A(Rounded)Rounded box
A([Stadium])Pill shape
A{Decision}Diamond — a yes/no branch
A((Circle))Circle
A[(Database)]Cylinder
A[[Subroutine]]Box with side bars
A flowchart of the seven shapes in a row: Rectangle, Rounded, Stadium, Decision, Circle, Database and Subroutine.
The seven shapes from the table, in the same order.

Arrows

WriteTo draw
A --> BSolid arrow
A --- BLine, no arrowhead
A -.-> BDotted arrow
A ==> BThick arrow
A -->|label| BArrow with a label

To draw a labeled box around some steps, put them between subgraph and end. The process recipe shows how.

A group can set its own direction with a line such as direction TB inside it. Since version 2.9, that line is followed only while no arrow joins a box inside the group to a box outside it. When it is not followed, a note under the text, Subgraph direction not followed, says what to write instead. See A flowchart whose subgraphs lost their direction.

Do not name a box end. Mermaid reads it as the end of a group. Use done or End instead.

Step by step: Draw a process and Draw an org chart. Every flowchart option is in the reference.