主题
Sequence Diagram Config Schema
txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/SequenceDiagramConfig
包含特定于时序图的配置的对象
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* |
SequenceDiagramConfig Type
object
(Sequence Diagram Config)
all of
SequenceDiagramConfig Properties
Property | Type | Required | Nullable | Defined by |
---|---|---|---|---|
arrowMarkerAbsolute | boolean | Optional | cannot be null | Mermaid Config |
hideUnusedParticipants | boolean | Optional | cannot be null | Mermaid Config |
activationWidth | integer | Required | cannot be null | Mermaid Config |
diagramMarginX | integer | Required | cannot be null | Mermaid Config |
diagramMarginY | integer | Required | cannot be null | Mermaid Config |
actorMargin | integer | Required | cannot be null | Mermaid Config |
width | integer | Required | cannot be null | Mermaid Config |
height | integer | Required | cannot be null | Mermaid Config |
boxMargin | integer | Required | cannot be null | Mermaid Config |
boxTextMargin | integer | Required | cannot be null | Mermaid Config |
noteMargin | integer | Required | cannot be null | Mermaid Config |
messageMargin | integer | Required | cannot be null | Mermaid Config |
messageAlign | string | Required | cannot be null | Mermaid Config |
mirrorActors | boolean | Required | cannot be null | Mermaid Config |
forceMenus | boolean | Required | cannot be null | Mermaid Config |
bottomMarginAdj | integer | Required | cannot be null | Mermaid Config |
rightAngles | boolean | Required | cannot be null | Mermaid Config |
showSequenceNumbers | boolean | Required | cannot be null | Mermaid Config |
actorFontSize | Multiple | Required | cannot be null | Mermaid Config |
actorFontFamily | string | Required | cannot be null | Mermaid Config |
actorFontWeight | Multiple | Required | cannot be null | Mermaid Config |
noteFontSize | Multiple | Required | cannot be null | Mermaid Config |
noteFontFamily | string | Required | cannot be null | Mermaid Config |
noteFontWeight | Multiple | Required | cannot be null | Mermaid Config |
noteAlign | string | Required | cannot be null | Mermaid Config |
messageFontSize | Multiple | Required | cannot be null | Mermaid Config |
messageFontFamily | string | Required | cannot be null | Mermaid Config |
messageFontWeight | Multiple | Required | cannot be null | Mermaid Config |
wrap | boolean | Optional | cannot be null | Mermaid Config |
wrapPadding | number | Optional | cannot be null | Mermaid Config |
labelBoxWidth | number | Optional | cannot be null | Mermaid Config |
labelBoxHeight | number | Optional | cannot be null | Mermaid Config |
messageFont | Not specified | Optional | cannot be null | Mermaid Config |
noteFont | Not specified | Optional | cannot be null | Mermaid Config |
actorFont | Not specified | Optional | cannot be null | Mermaid Config |
arrowMarkerAbsolute
arrowMarkerAbsolute
is optional
Type:
boolean
cannot be null
defined in: Mermaid Config
arrowMarkerAbsolute Type
boolean
hideUnusedParticipants
hideUnusedParticipants
is optional
Type:
boolean
cannot be null
defined in: Mermaid Config
hideUnusedParticipants Type
boolean
activationWidth
激活矩形的宽度
activationWidth
is required
Type:
integer
cannot be null
defined in: Mermaid Config
activationWidth Type
integer
activationWidth Constraints
minimum: the value of this number must greater than or equal to: 0
activationWidth Default Value
The default value is:
json
10
diagramMarginX
时序图右侧和左侧的边距
diagramMarginX
is required
Type:
integer
cannot be null
defined in: Mermaid Config
diagramMarginX Type
integer
diagramMarginX Constraints
minimum: the value of this number must greater than or equal to: 0
diagramMarginX Default Value
The default value is:
json
50
diagramMarginY
时序图上方和下方的边距
diagramMarginY
is required
Type:
integer
cannot be null
defined in: Mermaid Config
diagramMarginY Type
integer
diagramMarginY Constraints
minimum: the value of this number must greater than or equal to: 0
diagramMarginY Default Value
The default value is:
json
10
actorMargin
角色之间的边距
actorMargin
is required
Type:
integer
cannot be null
defined in: Mermaid Config
actorMargin Type
integer
actorMargin Constraints
minimum: the value of this number must greater than or equal to: 0
actorMargin Default Value
The default value is:
json
50
width
参与者框的宽度
width
is required
Type:
integer
cannot be null
defined in: Mermaid Config
width Type
integer
width Constraints
minimum: the value of this number must greater than or equal to: 0
width Default Value
The default value is:
json
150
height
角色框的高度
height
is required
Type:
integer
cannot be null
defined in: Mermaid Config
height Type
integer
height Constraints
minimum: the value of this number must greater than or equal to: 0
height Default Value
The default value is:
json
50
boxMargin
循环框周围的边距
boxMargin
is required
Type:
integer
cannot be null
defined in: Mermaid Config
boxMargin Type
integer
boxMargin Constraints
minimum: the value of this number must greater than or equal to: 0
boxMargin Default Value
The default value is:
json
10
boxTextMargin
循环/alt/opt 框中文本周围的边距
boxTextMargin
is required
Type:
integer
cannot be null
defined in: Mermaid Config
boxTextMargin Type
integer
boxTextMargin Constraints
minimum: the value of this number must greater than or equal to: 0
boxTextMargin Default Value
The default value is:
json
5
noteMargin
注释周围的边距
noteMargin
is required
Type:
integer
cannot be null
defined in: Mermaid Config
noteMargin Type
integer
noteMargin Constraints
minimum: the value of this number must greater than or equal to: 0
noteMargin Default Value
The default value is:
json
10
messageMargin
消息之间的空间。
messageMargin
is required
Type:
integer
cannot be null
defined in: Mermaid Config
messageMargin Type
integer
messageMargin Constraints
minimum: the value of this number must greater than or equal to: 0
messageMargin Default Value
The default value is:
json
35
messageAlign
多行消息对齐
messageAlign
is required
Type:
string
cannot be null
defined in: Mermaid Config
messageAlign Type
string
messageAlign Constraints
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
"left" | |
"center" | |
"right" |
messageAlign Default Value
The default value is:
json
"center"
mirrorActors
镜像图表下方的参与者
mirrorActors
is required
Type:
boolean
cannot be null
defined in: Mermaid Config
mirrorActors Type
boolean
mirrorActors Default Value
The default value is:
json
true
forceMenus
强制角色弹出菜单始终可见(以支持 E2E 测试)。
forceMenus
is required
Type:
boolean
cannot be null
defined in: Mermaid Config
forceMenus Type
boolean
bottomMarginAdj
向下延长图表的边缘。根据 css 样式,这可能需要调整。
bottomMarginAdj
is required
Type:
integer
cannot be null
defined in: Mermaid Config
bottomMarginAdj Type
integer
bottomMarginAdj Constraints
minimum: the value of this number must greater than or equal to: 0
bottomMarginAdj Default Value
The default value is:
json
1
rightAngles
弯曲箭头变为直角这将显示从同一节点开始并以直角而不是曲线开始的箭头。
rightAngles
is required
Type:
boolean
cannot be null
defined in: Mermaid Config
rightAngles Type
boolean
showSequenceNumbers
这将显示节点编号
showSequenceNumbers
is required
Type:
boolean
cannot be null
defined in: Mermaid Config
showSequenceNumbers Type
boolean
actorFontSize
这设置了参与者描述的字体大小
actorFontSize
is required
Type: any of the following:
string
ornumber
(Details)cannot be null
defined in: Mermaid Config
actorFontSize Type
any of the following: string
or number
(Details)
actorFontSize Default Value
The default value is:
json
14
actorFontFamily
这设置了参与者的描述
actorFontFamily
is required
Type:
string
cannot be null
defined in: Mermaid Config
actorFontFamily Type
string
actorFontFamily Default Value
The default value is:
json
"\"Open Sans\", sans-serif"
actorFontWeight
这设置了参与者描述的字体粗细
actorFontWeight
is required
Type: any of the following:
string
ornumber
(Details)cannot be null
defined in: Mermaid Config
actorFontWeight Type
any of the following: string
or number
(Details)
actorFontWeight Default Value
The default value is:
json
400
noteFontSize
这设置了参与者附加注释的字体大小
noteFontSize
is required
Type: any of the following:
string
ornumber
(Details)cannot be null
defined in: Mermaid Config
noteFontSize Type
any of the following: string
or number
(Details)
noteFontSize Default Value
The default value is:
json
14
noteFontFamily
这设置了参与者附加注释的字体系列
noteFontFamily
is required
Type:
string
cannot be null
defined in: Mermaid Config
noteFontFamily Type
string
noteFontFamily Default Value
The default value is:
json
"\"trebuchet ms\", verdana, arial, sans-serif"
noteFontWeight
这设置了参与者附加注释的字体粗细
noteFontWeight
is required
Type: any of the following:
string
ornumber
(Details)cannot be null
defined in: Mermaid Config
noteFontWeight Type
any of the following: string
or number
(Details)
noteFontWeight Default Value
The default value is:
json
400
noteAlign
这设置了参与者附加注释的文本对齐方式
noteAlign
is required
Type:
string
cannot be null
defined in: Mermaid Config
noteAlign Type
string
noteAlign Constraints
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
"left" | |
"center" | |
"right" |
noteAlign Default Value
The default value is:
json
"center"
messageFontSize
这设置了参与者消息的字体大小
messageFontSize
is required
Type: any of the following:
string
ornumber
(Details)cannot be null
defined in: Mermaid Config
messageFontSize Type
any of the following: string
or number
(Details)
messageFontSize Default Value
The default value is:
json
16
messageFontFamily
这设置了参与者消息的字体系列
messageFontFamily
is required
Type:
string
cannot be null
defined in: Mermaid Config
messageFontFamily Type
string
messageFontFamily Default Value
The default value is:
json
"\"trebuchet ms\", verdana, arial, sans-serif"
messageFontWeight
这设置了参与者消息的字体粗细
messageFontWeight
is required
Type: any of the following:
string
ornumber
(Details)cannot be null
defined in: Mermaid Config
messageFontWeight Type
any of the following: string
or number
(Details)
messageFontWeight Default Value
The default value is:
json
400
wrap
设置图表的自动换行状态
wrap
is optional
Type:
boolean
cannot be null
defined in: Mermaid Config
wrap Type
boolean
wrapPadding
设置图表的自动换行填充(仅限侧面)
wrapPadding
is optional
Type:
number
cannot be null
defined in: Mermaid Config
wrapPadding Type
number
wrapPadding Default Value
The default value is:
json
10
labelBoxWidth
这设置了循环框的宽度(循环、alt、opt、par)
labelBoxWidth
is optional
Type:
number
cannot be null
defined in: Mermaid Config
labelBoxWidth Type
number
labelBoxWidth Default Value
The default value is:
json
50
labelBoxHeight
这设置了循环框的高度(循环、alt、opt、par)
labelBoxHeight
is optional
Type:
number
cannot be null
defined in: Mermaid Config
labelBoxHeight Type
number
labelBoxHeight Default Value
The default value is:
json
20
messageFont
返回 FontConfig
的 JavaScript 函数。默认情况下,这些函数返回适当的 *FontSize
、*FontFamily
、*FontWeight
值。
For example, the font calculator called boundaryFont
might be defined as:
javascript
boundaryFont: function () {
return {
fontFamily: this.boundaryFontFamily,
fontSize: this.boundaryFontSize,
fontWeight: this.boundaryFontWeight,
};
}
messageFont
is optional
Type: unknown (Font Calculator)
cannot be null
defined in: Mermaid Config
tsType:
() => Partial<FontConfig>
messageFont Type
unknown (Font Calculator)
noteFont
返回 FontConfig
的 JavaScript 函数。默认情况下,这些函数返回适当的 *FontSize
、*FontFamily
、*FontWeight
值。
For example, the font calculator called boundaryFont
might be defined as:
javascript
boundaryFont: function () {
return {
fontFamily: this.boundaryFontFamily,
fontSize: this.boundaryFontSize,
fontWeight: this.boundaryFontWeight,
};
}
noteFont
is optional
Type: unknown (Font Calculator)
cannot be null
defined in: Mermaid Config
tsType:
() => Partial<FontConfig>
noteFont Type
unknown (Font Calculator)
actorFont
返回 FontConfig
的 JavaScript 函数。默认情况下,这些函数返回适当的 *FontSize
、*FontFamily
、*FontWeight
值。
For example, the font calculator called boundaryFont
might be defined as:
javascript
boundaryFont: function () {
return {
fontFamily: this.boundaryFontFamily,
fontSize: this.boundaryFontSize,
fontWeight: this.boundaryFontWeight,
};
}
actorFont
is optional
Type: unknown (Font Calculator)
cannot be null
defined in: Mermaid Config
tsType:
() => Partial<FontConfig>
actorFont Type
unknown (Font Calculator)