Skip to content

Sankey Diagram Config Schema

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

包含特定于桑基图的配置的对象。

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

桑基图中链接的颜色。

linkColor

linkColor Type

merged type (Details)

any of

linkColor Default Value

The default value is:

json
"gradient"

nodeAlignment

控制桑基图的对齐方式。

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

切换以显示或隐藏值以及标题。

showValues

showValues Type

boolean

showValues Default Value

The default value is:

json
true

prefix

用于值的前缀

prefix

prefix Type

string

suffix

用于值的后缀

suffix

suffix Type

string