主题
Sankey Diagram Config Schema
txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/SankeyDiagramConfig包含特定于桑基图的配置的对象。
| 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:
json
600height
height
is optional
Type:
numbercannot be null
defined in: Mermaid Config
height Type
number
height Default Value
The default value is:
json
400linkColor
桑基图中链接的颜色。
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:
json
"gradient"nodeAlignment
控制桑基图的对齐方式。
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:
json
"justify"useMaxWidth
useMaxWidth
is optional
Type:
booleancannot be null
defined in: Mermaid Config
useMaxWidth Type
boolean
useMaxWidth Default Value
The default value is:
json
falseshowValues
切换以显示或隐藏值以及标题。
showValues
is optional
Type:
booleancannot be null
defined in: Mermaid Config
showValues Type
boolean
showValues Default Value
The default value is:
json
trueprefix
用于值的前缀
prefix
is optional
Type:
stringcannot be null
defined in: Mermaid Config
prefix Type
string
prefix Default Value
The default value is:
json
""suffix
用于值的后缀
suffix
is optional
Type:
stringcannot be null
defined in: Mermaid Config
suffix Type
string
suffix Default Value
The default value is:
json
""nodeWidth
桑基图中节点的宽度。
nodeWidth
is optional
Type:
numbercannot be null
defined in: Mermaid Config
nodeWidth Type
number
nodeWidth Default Value
The default value is:
json
10nodePadding
桑基图中节点之间的填充间距。
nodePadding
is optional
Type:
numbercannot be null
defined in: Mermaid Config
nodePadding Type
number
nodePadding Default Value
The default value is:
json
12labelStyle
桑基图中标签的样式。
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:
json
"legacy"nodeColors
节点 ID 到其颜色的映射。未指定的节点将使用默认配色方案。
nodeColors
is optional
Type:
object(Details)cannot be null
defined in: Mermaid Config
nodeColors Type
object (Details)