Skip to content

Sankey Diagram Config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/SankeyDiagramConfig

The object containing configurations specific for sankey diagrams.

AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

SankeyDiagramConfig Type ​

object (Sankey Diagram Config)

all of

SankeyDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
widthnumberOptionalcannot be nullMermaid Config
heightnumberOptionalcannot be nullMermaid Config
linkColorMergedOptionalcannot be nullMermaid Config
nodeAlignmentstringOptionalcannot be nullMermaid Config
useMaxWidthbooleanOptionalcannot be nullMermaid Config
showValuesbooleanOptionalcannot be nullMermaid Config
prefixstringOptionalcannot be nullMermaid Config
suffixstringOptionalcannot be nullMermaid Config

width ​

width

width Type ​

number

width Default Value ​

The default value is:

json
600

height ​

height

height Type ​

number

height Default Value ​

The default value is:

json
400

linkColor ​

The color of the links in the sankey diagram.

linkColor

linkColor Type ​

merged type (Details)

any of

linkColor Default Value ​

The default value is:

json
"gradient"

nodeAlignment ​

Controls the alignment of the Sankey diagrams.

See https://github.com/d3/d3-sankey#alignments.

nodeAlignment

nodeAlignment Type ​

string

nodeAlignment Constraints ​

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"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:

json
"justify"

useMaxWidth ​

useMaxWidth

useMaxWidth Type ​

boolean

showValues ​

Toggle to display or hide values along with title.

showValues

showValues Type ​

boolean

showValues Default Value ​

The default value is:

json
true

prefix ​

The prefix to use for values

prefix

prefix Type ​

string

suffix ​

The suffix to use for values

suffix

suffix Type ​

string

Opens in MermaidChart.com