Flowchart Diagram Config Schema β
https://mermaid.js.org/schemas/config.schema.json#/$defs/FlowchartDiagramConfig
The object containing configurations specific for flowcharts
Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
---|---|---|---|---|---|---|---|
Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | config.schema.json* |
FlowchartDiagramConfig Type β
object
(Flowchart Diagram Config)
all of
FlowchartDiagramConfig Properties β
Property | Type | Required | Nullable | Defined by |
---|---|---|---|---|
titleTopMargin | integer | Required | cannot be null | Mermaid Config |
subGraphTitleMargin | object | Required | cannot be null | Mermaid Config |
arrowMarkerAbsolute | boolean | Optional | cannot be null | Mermaid Config |
diagramPadding | integer | Required | cannot be null | Mermaid Config |
htmlLabels | boolean | Required | cannot be null | Mermaid Config |
nodeSpacing | integer | Required | cannot be null | Mermaid Config |
rankSpacing | integer | Required | cannot be null | Mermaid Config |
curve | string | Required | cannot be null | Mermaid Config |
padding | number | Optional | cannot be null | Mermaid Config |
defaultRenderer | string | Required | cannot be null | Mermaid Config |
wrappingWidth | number | Required | cannot be null | Mermaid Config |
inheritDir | boolean | Optional | cannot be null | Mermaid Config |
titleTopMargin β
Margin top for the text over the diagram
titleTopMargin
is required
Type:
integer
cannot be null
defined in: Mermaid Config
titleTopMargin Type β
integer
titleTopMargin Constraints β
minimum: the value of this number must greater than or equal to: 0
titleTopMargin Default Value β
The default value is:
25
subGraphTitleMargin β
Defines a top/bottom margin for subgraph titles
subGraphTitleMargin
is required
Type:
object
(Details)cannot be null
defined in: Mermaid Config
subGraphTitleMargin Type β
object
(Details)
subGraphTitleMargin Default Value β
The default value is:
{
"top": 0,
"bottom": 0
}
arrowMarkerAbsolute β
arrowMarkerAbsolute
is optional
Type:
boolean
cannot be null
defined in: Mermaid Config
arrowMarkerAbsolute Type β
boolean
diagramPadding β
The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels.
diagramPadding
is required
Type:
integer
cannot be null
defined in: Mermaid Config
diagramPadding Type β
integer
diagramPadding Constraints β
minimum: the value of this number must greater than or equal to: 0
diagramPadding Default Value β
The default value is:
20
htmlLabels β
Flag for setting whether or not a html tag should be used for rendering labels on the edges.
htmlLabels
is required
Type:
boolean
cannot be null
defined in: Mermaid Config
htmlLabels Type β
boolean
htmlLabels Default Value β
The default value is:
true
nodeSpacing β
Defines the spacing between nodes on the same level
Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.
nodeSpacing
is required
Type:
integer
cannot be null
defined in: Mermaid Config
nodeSpacing Type β
integer
nodeSpacing Constraints β
minimum: the value of this number must greater than or equal to: 0
nodeSpacing Default Value β
The default value is:
50
rankSpacing β
Defines the spacing between nodes on different levels
Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.
rankSpacing
is required
Type:
integer
cannot be null
defined in: Mermaid Config
rankSpacing Type β
integer
rankSpacing Constraints β
minimum: the value of this number must greater than or equal to: 0
rankSpacing Default Value β
The default value is:
50
curve β
Defines how mermaid renders curves for flowcharts.
curve
is required
Type:
string
cannot be null
defined in: Mermaid Config
curve Type β
string
curve Constraints β
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
"basis" | |
"bumpX" | |
"bumpY" | |
"cardinal" | |
"catmullRom" | |
"linear" | |
"monotoneX" | |
"monotoneY" | |
"natural" | |
"step" | |
"stepAfter" | |
"stepBefore" |
curve Default Value β
The default value is:
"basis"
padding β
Represents the padding between the labels and the shape
Only used in new experimental rendering.
padding
is optional
Type:
number
cannot be null
defined in: Mermaid Config
padding Type β
number
padding Default Value β
The default value is:
15
defaultRenderer β
Decides which rendering engine that is to be used for the rendering.
defaultRenderer
is required
Type:
string
cannot be null
defined in: Mermaid Config
defaultRenderer Type β
string
defaultRenderer Constraints β
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
"dagre-d3" | The [dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es) library. |
"dagre-wrapper" | wrapper for dagre implemented in mermaid |
"elk" | Layout using [elkjs](https://github.com/kieler/elkjs) |
defaultRenderer Default Value β
The default value is:
"dagre-wrapper"
wrappingWidth β
Width of nodes where text is wrapped.
When using markdown strings the text is wrapped automatically, this value sets the max width of a text before it continues on a new line.
wrappingWidth
is required
Type:
number
cannot be null
defined in: Mermaid Config
wrappingWidth Type β
number
wrappingWidth Default Value β
The default value is:
200
inheritDir β
If true, subgraphs without explicit direction will inherit the global graph direction (e.g., LR, TB, RL, BT). Defaults to false to preserve legacy layout behavior.
inheritDir
is optional
Type:
boolean
cannot be null
defined in: Mermaid Config
inheritDir Type β
boolean