Sankey Diagram Config Schema
https://mermaid.js.org/schemas/config.schema.json#/$defs/SankeyDiagramConfigThe object containing configurations specific for sankey diagrams.
| 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* |
SankeyDiagramConfig Type
object (Sankey Diagram Config)
all of
SankeyDiagramConfig Properties
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| width | number | Optional | cannot be null | Mermaid Config |
| height | number | Optional | cannot be null | Mermaid Config |
| linkColor | Merged | Optional | cannot be null | Mermaid Config |
| nodeAlignment | string | Optional | cannot be null | Mermaid Config |
| useMaxWidth | boolean | Optional | cannot be null | Mermaid Config |
| showValues | boolean | Optional | cannot be null | Mermaid Config |
| prefix | string | Optional | cannot be null | Mermaid Config |
| suffix | string | Optional | cannot be null | Mermaid Config |
| nodeWidth | number | Optional | cannot be null | Mermaid Config |
| nodePadding | number | Optional | cannot be null | Mermaid Config |
| labelStyle | string | Optional | cannot be null | Mermaid Config |
| nodeColors | object | Optional | cannot be null | Mermaid Config |
width
width
is optional
Type:
numbercannot be null
defined in: Mermaid Config
width Type
number
width Default Value
The default value is:
600height
height
is optional
Type:
numbercannot be null
defined in: Mermaid Config
height Type
number
height Default Value
The default value is:
400linkColor
The color of the links in the sankey diagram.
linkColor
is optional
Type: merged type (Details)
cannot be null
defined in: Mermaid Config
linkColor Type
merged type (Details)
any of
linkColor Default Value
The default value is:
"gradient"nodeAlignment
Controls the alignment of the Sankey diagrams.
See https://github.com/d3/d3-sankey#alignments.
nodeAlignment
is optional
Type:
stringcannot be null
defined in: Mermaid Config
nodeAlignment Type
string
nodeAlignment Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"left" | Align all inputs to the left. |
"right" | Align all outputs to the right. |
"center" | Like `left`, except that nodes without any incoming links are moved as right as possible. |
"justify" | Like `left`, except that nodes without any outgoing links are moved to the far right. |
nodeAlignment Default Value
The default value is:
"justify"useMaxWidth
useMaxWidth
is optional
Type:
booleancannot be null
defined in: Mermaid Config
useMaxWidth Type
boolean
useMaxWidth Default Value
The default value is:
falseshowValues
Toggle to display or hide values along with title.
showValues
is optional
Type:
booleancannot be null
defined in: Mermaid Config
showValues Type
boolean
showValues Default Value
The default value is:
trueprefix
The prefix to use for values
prefix
is optional
Type:
stringcannot be null
defined in: Mermaid Config
prefix Type
string
prefix Default Value
The default value is:
""suffix
The suffix to use for values
suffix
is optional
Type:
stringcannot be null
defined in: Mermaid Config
suffix Type
string
suffix Default Value
The default value is:
""nodeWidth
The width of the nodes in the sankey diagram.
nodeWidth
is optional
Type:
numbercannot be null
defined in: Mermaid Config
nodeWidth Type
number
nodeWidth Default Value
The default value is:
10nodePadding
The padding between nodes in the sankey diagram.
nodePadding
is optional
Type:
numbercannot be null
defined in: Mermaid Config
nodePadding Type
number
nodePadding Default Value
The default value is:
12labelStyle
The style of labels in the sankey diagram.
labelStyle
is optional
Type:
stringcannot be null
defined in: Mermaid Config
labelStyle Type
string
labelStyle Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"legacy" | Plain text labels (original style). |
"outlined" | Labels with a white outline for better readability against colored backgrounds. |
labelStyle Default Value
The default value is:
"legacy"nodeColors
A mapping of node IDs to their colors. Nodes not specified will use the default color scheme.
nodeColors
is optional
Type:
object(Details)cannot be null
defined in: Mermaid Config
nodeColors Type
object (Details)