Skip to content

Flowchart Diagram Config Schema

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

包含特定于流程图的配置的对象

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

FlowchartDiagramConfig Type

object (Flowchart Diagram Config)

all of

FlowchartDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
titleTopMarginintegerRequiredcannot be nullMermaid Config
subGraphTitleMarginobjectRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
diagramPaddingintegerRequiredcannot be nullMermaid Config
htmlLabelsbooleanRequiredcannot be nullMermaid Config
nodeSpacingintegerRequiredcannot be nullMermaid Config
rankSpacingintegerRequiredcannot be nullMermaid Config
curvestringRequiredcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
defaultRendererstringRequiredcannot be nullMermaid Config
wrappingWidthnumberRequiredcannot be nullMermaid Config

titleTopMargin

图表上方文本的顶部边​​距

titleTopMargin

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
25

subGraphTitleMargin

定义子图标题的顶部/底部边距

subGraphTitleMargin

subGraphTitleMargin Type

object (Details)

subGraphTitleMargin Default Value

The default value is:

json
{
  "top": 0,
  "bottom": 0
}

arrowMarkerAbsolute

arrowMarkerAbsolute

arrowMarkerAbsolute Type

boolean

diagramPadding

整个图表周围的填充量,以便嵌入的图表具有边距,以像素表示。

diagramPadding

diagramPadding Type

integer

diagramPadding Constraints

minimum: the value of this number must greater than or equal to: 0

diagramPadding Default Value

The default value is:

json
20

htmlLabels

用于设置是否应使用 html 标记来渲染边上的标签的标志。

htmlLabels

htmlLabels Type

boolean

htmlLabels Default Value

The default value is:

json
true

nodeSpacing

定义同一级别上节点之间的间距 涉及 TB(从上到下)或 BT(从下到上)图的水平间距,以及 LR 和 RL 图的垂直间距。

nodeSpacing

nodeSpacing Type

integer

nodeSpacing Constraints

minimum: the value of this number must greater than or equal to: 0

nodeSpacing Default Value

The default value is:

json
50

rankSpacing

定义不同级别上节点之间的间距 涉及 TB(从上到下)或 BT(从下到上)图的水平间距,以及 LR 和 RL 图的垂直间距。

rankSpacing

rankSpacing Type

integer

rankSpacing Constraints

minimum: the value of this number must greater than or equal to: 0

rankSpacing Default Value

The default value is:

json
50

curve

定义 mermaid 如何为流程图渲染曲线。

curve

curve Type

string

curve Constraints

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

ValueExplanation
"basis"
"linear"
"cardinal"

curve Default Value

The default value is:

json
"basis"

padding

表示标签和形状之间的填充 仅用于新的实验性渲染。

padding

padding Type

number

padding Default Value

The default value is:

json
15

defaultRenderer

决定要使用哪个渲染引擎进行渲染。

defaultRenderer

defaultRenderer Type

string

defaultRenderer Constraints

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

ValueExplanation
"dagre-d3"The [dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es) library.
"dagre-wrapper"wrapper for dagre implemented in mermaid
"elk"Layout using [elkjs](https://github.com/kieler/elkjs)

defaultRenderer Default Value

The default value is:

json
"dagre-wrapper"

wrappingWidth

文本换行的节点的宽度。使用 markdown 字符串时,文本会自动换行,此值设置文本在新行继续之前的最大宽度。

wrappingWidth

wrappingWidth Type

number

wrappingWidth Default Value

The default value is:

json
200