Skip to content

State Diagram Config Schema

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

The object containing configurations specific for entity relationship diagrams

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
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

Margin top for the text over the diagram

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

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

Font size factor, this is used to guess the width of the edges labels before rendering by dagre layout. This might need updating if/when switching font

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

Decides which rendering engine that is to be used for the rendering.

defaultRenderer

  • is required

  • Type: string

  • cannot be null

  • defined in: Mermaid Config

  • tsType: string | "dagre-d3" | "dagre-wrapper" | "elk"

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"