Skip to content

Er Diagram Config Schema ​

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

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

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

ErDiagramConfig Type ​

object (Er Diagram Config)

all of

ErDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
titleTopMarginintegerRequiredcannot be nullMermaid Config
diagramPaddingintegerRequiredcannot be nullMermaid Config
layoutDirectionstringRequiredcannot be nullMermaid Config
minEntityWidthintegerRequiredcannot be nullMermaid Config
minEntityHeightintegerRequiredcannot be nullMermaid Config
entityPaddingintegerRequiredcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
strokestringRequiredcannot be nullMermaid Config
fillstringRequiredcannot be nullMermaid Config
fontSizeintegerOptionalcannot be nullMermaid Config

theme ​

主题,CSS 样式表。你也可以使用 themeCSS 覆盖此值。

theme

theme Type ​

string

theme Constraints ​

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

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

look Type ​

string

look Constraints ​

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

ValueExplanation
"classic"
"handDrawn"
"neo"

look Default Value ​

The default value is:

json
"neo"

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

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

layoutDirection ​

实体布局的方向偏差

layoutDirection

layoutDirection Type ​

string

layoutDirection Constraints ​

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

ValueExplanation
"TB"Top-Bottom
"BT"Bottom-Top
"LR"Left-Right
"RL"Right to Left

layoutDirection Default Value ​

The default value is:

json
"TB"

minEntityWidth ​

实体框的最小宽度。以像素表示。

minEntityWidth

minEntityWidth Type ​

integer

minEntityWidth Constraints ​

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

minEntityWidth Default Value ​

The default value is:

json
100

minEntityHeight ​

实体框的最小高度。以像素表示。

minEntityHeight

minEntityHeight Type ​

integer

minEntityHeight Constraints ​

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

minEntityHeight Default Value ​

The default value is:

json
75

entityPadding ​

实体框中的文本与封闭框边框之间的最小内部填充。以像素表示。

entityPadding

entityPadding Type ​

integer

entityPadding Constraints ​

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

entityPadding Default Value ​

The default value is:

json
15

nodeSpacing ​

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
140

rankSpacing ​

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
80

stroke ​

框边缘和线条的描边颜色。

stroke

stroke Type ​

string

stroke Default Value ​

The default value is:

json
"gray"

fill ​

实体框的填充颜色

fill

fill Type ​

string

fill Default Value ​

The default value is:

json
"honeydew"

fontSize ​

字体大小(表示为表示像素数的整数)

fontSize

fontSize Type ​

integer

fontSize Constraints ​

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

fontSize Default Value ​

The default value is:

json
12
Opens in mermaid.ai