Skip to content

State Diagram Config Schema

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

包含特定于实体关系图的配置的对象

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

StateDiagramConfig Type

object (State Diagram Config)

all of

StateDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
titleTopMarginintegerRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
dividerMarginnumberOptionalcannot be nullMermaid Config
sizeUnitnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
textHeightnumberOptionalcannot be nullMermaid Config
titleShiftnumberOptionalcannot be nullMermaid Config
noteMarginnumberOptionalcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
forkWidthnumberOptionalcannot be nullMermaid Config
forkHeightnumberOptionalcannot be nullMermaid Config
miniPaddingnumberOptionalcannot be nullMermaid Config
fontSizeFactornumberOptionalcannot be nullMermaid Config
fontSizenumberOptionalcannot be nullMermaid Config
labelHeightnumberOptionalcannot be nullMermaid Config
edgeLengthFactorstringOptionalcannot be nullMermaid Config
compositTitleSizenumberOptionalcannot be nullMermaid Config
radiusnumberOptionalcannot be nullMermaid Config
defaultRendererstringRequiredcannot 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

arrowMarkerAbsolute

arrowMarkerAbsolute

arrowMarkerAbsolute Type

boolean

dividerMargin

dividerMargin

dividerMargin Type

number

dividerMargin Default Value

The default value is:

json
10

sizeUnit

sizeUnit

sizeUnit Type

number

sizeUnit Default Value

The default value is:

json
5

padding

padding

padding Type

number

padding Default Value

The default value is:

json
8

textHeight

textHeight

textHeight Type

number

textHeight Default Value

The default value is:

json
10

titleShift

titleShift

titleShift Type

number

titleShift Default Value

The default value is:

json
-15

noteMargin

noteMargin

noteMargin Type

number

noteMargin Default Value

The default value is:

json
10

nodeSpacing

nodeSpacing

nodeSpacing Type

integer

nodeSpacing Constraints

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

rankSpacing

rankSpacing

rankSpacing Type

integer

rankSpacing Constraints

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

forkWidth

forkWidth

forkWidth Type

number

forkWidth Default Value

The default value is:

json
70

forkHeight

forkHeight

forkHeight Type

number

forkHeight Default Value

The default value is:

json
7

miniPadding

miniPadding

miniPadding Type

number

miniPadding Default Value

The default value is:

json
2

fontSizeFactor

字体大小因子,用于在通过 dagre 布局渲染之前猜测边标签的宽度。如果/当切换字体时,可能需要更新

fontSizeFactor

fontSizeFactor Type

number

fontSizeFactor Default Value

The default value is:

json
5.02

fontSize

fontSize

fontSize Type

number

fontSize Default Value

The default value is:

json
24

labelHeight

labelHeight

labelHeight Type

number

labelHeight Default Value

The default value is:

json
16

edgeLengthFactor

edgeLengthFactor

edgeLengthFactor Type

string

edgeLengthFactor Default Value

The default value is:

json
"20"

compositTitleSize

compositTitleSize

compositTitleSize Type

number

compositTitleSize Default Value

The default value is:

json
35

radius

radius

radius Type

number

radius Default Value

The default value is:

json
5

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"