主题
State Diagram Config Schema
txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/StateDiagramConfig包含特定于实体关系图的配置的对象
| 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* |
StateDiagramConfig Type
object (State Diagram Config)
all of
StateDiagramConfig Properties
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| theme | string | Optional | cannot be null | Mermaid Config |
| look | string | Optional | cannot be null | Mermaid Config |
| layout | string | Optional | cannot be null | Mermaid Config |
| wrappingWidth | number | Required | cannot be null | Mermaid Config |
| minNodeWidth | number | Required | cannot be null | Mermaid Config |
| titleTopMargin | integer | Required | cannot be null | Mermaid Config |
| arrowMarkerAbsolute | boolean | Optional | cannot be null | Mermaid Config |
| dividerMargin | number | Optional | cannot be null | Mermaid Config |
| sizeUnit | number | Optional | cannot be null | Mermaid Config |
| padding | number | Optional | cannot be null | Mermaid Config |
| textHeight | number | Optional | cannot be null | Mermaid Config |
| titleShift | number | Optional | cannot be null | Mermaid Config |
| noteMargin | number | Optional | cannot be null | Mermaid Config |
| nodeSpacing | integer | Optional | cannot be null | Mermaid Config |
| rankSpacing | integer | Optional | cannot be null | Mermaid Config |
| forkWidth | number | Optional | cannot be null | Mermaid Config |
| forkHeight | number | Optional | cannot be null | Mermaid Config |
| miniPadding | number | Optional | cannot be null | Mermaid Config |
| fontSizeFactor | number | Optional | cannot be null | Mermaid Config |
| fontSize | number | Optional | cannot be null | Mermaid Config |
| labelHeight | number | Optional | cannot be null | Mermaid Config |
| edgeLengthFactor | string | Optional | cannot be null | Mermaid Config |
| compositTitleSize | number | Optional | cannot be null | Mermaid Config |
| radius | number | Optional | cannot be null | Mermaid Config |
theme
主题,CSS 样式表。你也可以使用 themeCSS 覆盖此值。
theme
is optional
Type:
stringcannot be null
defined in: Mermaid Config
theme Type
string
theme Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"default" | |
"base" | |
"dark" | |
"forest" | |
"neutral" | |
"neo" | |
"neo-dark" | |
"redux" | |
"redux-dark" | |
"redux-color" | |
"redux-dark-color" | |
"null" | Can be set to disable any pre-defined mermaid theme |
theme Default Value
The default value is:
json
"redux-color"look
定义图表要使用的主要外观。
look
is optional
Type:
stringcannot be null
defined in: Mermaid Config
look Type
string
look Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"classic" | |
"handDrawn" | |
"neo" |
look Default Value
The default value is:
json
"neo"layout
定义用于渲染图表的布局算法。
layout
is optional
Type:
stringcannot be null
defined in: Mermaid Config
layout Type
string
layout Default Value
The default value is:
json
"elk"wrappingWidth
文本换行的节点宽度。使用 Markdown 字符串时,文本会自动换行,此值设置文本在换行前的最大宽度。
wrappingWidth
is required
Type:
numbercannot be null
defined in: Mermaid Config
wrappingWidth Type
number
wrappingWidth Default Value
The default value is:
json
120minNodeWidth
节点标签区域的最小宽度。比这个宽的标签会被加宽,所以短文本的节点也会有统一的宽度;节点自身的内边距会叠加上去,就像 wrappingWidth 的情况一样。设置了明确宽度的节点不受影响。
minNodeWidth
is required
Type:
numbercannot be null
defined in: Mermaid Config
minNodeWidth Type
number
minNodeWidth Default Value
The default value is:
json
120titleTopMargin
图表上方文本的顶部边距
titleTopMargin
is required
Type:
integercannot 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:
json
25arrowMarkerAbsolute
arrowMarkerAbsolute
is optional
Type:
booleancannot be null
defined in: Mermaid Config
arrowMarkerAbsolute Type
boolean
dividerMargin
dividerMargin
is optional
Type:
numbercannot be null
defined in: Mermaid Config
dividerMargin Type
number
dividerMargin Default Value
The default value is:
json
10sizeUnit
sizeUnit
is optional
Type:
numbercannot be null
defined in: Mermaid Config
sizeUnit Type
number
sizeUnit Default Value
The default value is:
json
5padding
padding
is optional
Type:
numbercannot be null
defined in: Mermaid Config
padding Type
number
padding Default Value
The default value is:
json
8textHeight
textHeight
is optional
Type:
numbercannot be null
defined in: Mermaid Config
textHeight Type
number
textHeight Default Value
The default value is:
json
10titleShift
titleShift
is optional
Type:
numbercannot be null
defined in: Mermaid Config
titleShift Type
number
titleShift Default Value
The default value is:
json
-15noteMargin
noteMargin
is optional
Type:
numbercannot be null
defined in: Mermaid Config
noteMargin Type
number
noteMargin Default Value
The default value is:
json
10nodeSpacing
nodeSpacing
is optional
Type:
integercannot be null
defined in: Mermaid Config
nodeSpacing Type
integer
nodeSpacing Constraints
minimum: the value of this number must greater than or equal to: 0
rankSpacing
rankSpacing
is optional
Type:
integercannot be null
defined in: Mermaid Config
rankSpacing Type
integer
rankSpacing Constraints
minimum: the value of this number must greater than or equal to: 0
forkWidth
forkWidth
is optional
Type:
numbercannot be null
defined in: Mermaid Config
forkWidth Type
number
forkWidth Default Value
The default value is:
json
70forkHeight
forkHeight
is optional
Type:
numbercannot be null
defined in: Mermaid Config
forkHeight Type
number
forkHeight Default Value
The default value is:
json
7miniPadding
miniPadding
is optional
Type:
numbercannot be null
defined in: Mermaid Config
miniPadding Type
number
miniPadding Default Value
The default value is:
json
2fontSizeFactor
字体大小因子,用于在通过 dagre 布局渲染之前猜测边标签的宽度。如果/当切换字体时,可能需要更新
fontSizeFactor
is optional
Type:
numbercannot be null
defined in: Mermaid Config
fontSizeFactor Type
number
fontSizeFactor Default Value
The default value is:
json
5.02fontSize
fontSize
is optional
Type:
numbercannot be null
defined in: Mermaid Config
fontSize Type
number
fontSize Default Value
The default value is:
json
24labelHeight
labelHeight
is optional
Type:
numbercannot be null
defined in: Mermaid Config
labelHeight Type
number
labelHeight Default Value
The default value is:
json
16edgeLengthFactor
edgeLengthFactor
is optional
Type:
stringcannot be null
defined in: Mermaid Config
edgeLengthFactor Type
string
edgeLengthFactor Default Value
The default value is:
json
"20"compositTitleSize
compositTitleSize
is optional
Type:
numbercannot be null
defined in: Mermaid Config
compositTitleSize Type
number
compositTitleSize Default Value
The default value is:
json
35radius
radius
is optional
Type:
numbercannot be null
defined in: Mermaid Config
radius Type
number
radius Default Value
The default value is:
json
5