Skip to content

Mermaid Config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json
AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenForbiddennoneconfig.schema.json

Mermaid Config Type ​

object (Mermaid Config)

Mermaid Config Properties ​

PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
themeVariablesNot specifiedOptionalcannot be nullMermaid Config
themeCSSstringOptionalcannot be nullMermaid Config
lookstringRequiredcannot be nullMermaid Config
handDrawnSeednumberOptionalcannot be nullMermaid Config
layoutstringOptionalcannot be nullMermaid Config
maxTextSizenumberOptionalcannot be nullMermaid Config
maxEdgesintegerOptionalcannot be nullMermaid Config
elkobjectOptionalcannot be nullMermaid Config
darkModebooleanOptionalcannot be nullMermaid Config
htmlLabelsbooleanOptionalcannot be nullMermaid Config
fontFamilystringRequiredcannot be nullMermaid Config
altFontFamilystringOptionalcannot be nullMermaid Config
logLevelMultipleRequiredcannot be nullMermaid Config
securityLevelstringRequiredcannot be nullMermaid Config
startOnLoadbooleanRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanRequiredcannot be nullMermaid Config
securearrayOptionalcannot be nullMermaid Config
legacyMathMLbooleanOptionalcannot be nullMermaid Config
forceLegacyMathMLbooleanOptionalcannot be nullMermaid Config
deterministicIdsbooleanOptionalcannot be nullMermaid Config
deterministicIDSeedstringOptionalcannot be nullMermaid Config
flowchartMergedRequiredcannot be nullMermaid Config
swimlaneMergedOptionalcannot be nullMermaid Config
agentflowMergedOptionalcannot be nullMermaid Config
sequenceMergedRequiredcannot be nullMermaid Config
ganttMergedRequiredcannot be nullMermaid Config
journeyMergedRequiredcannot be nullMermaid Config
timelineMergedOptionalcannot be nullMermaid Config
classMergedRequiredcannot be nullMermaid Config
stateMergedRequiredcannot be nullMermaid Config
erMergedRequiredcannot be nullMermaid Config
pieMergedRequiredcannot be nullMermaid Config
quadrantChartMergedRequiredcannot be nullMermaid Config
xyChartMergedRequiredcannot be nullMermaid Config
requirementMergedRequiredcannot be nullMermaid Config
architectureMergedRequiredcannot be nullMermaid Config
mindmapMergedRequiredcannot be nullMermaid Config
ishikawaMergedOptionalcannot be nullMermaid Config
kanbanMergedRequiredcannot be nullMermaid Config
gitGraphMergedRequiredcannot be nullMermaid Config
c4MergedRequiredcannot be nullMermaid Config
sankeyMergedRequiredcannot be nullMermaid Config
packetMergedRequiredcannot be nullMermaid Config
blockMergedRequiredcannot be nullMermaid Config
eventmodelingMergedRequiredcannot be nullMermaid Config
treeViewMergedRequiredcannot be nullMermaid Config
radarMergedRequiredcannot be nullMermaid Config
usecaseMergedRequiredcannot be nullMermaid Config
vennMergedRequiredcannot be nullMermaid Config
wardley-betaMergedOptionalcannot be nullMermaid Config
cynefinMergedOptionalcannot be nullMermaid Config
railroadMergedOptionalcannot be nullMermaid Config
dompurifyConfigobjectOptionalcannot be nullMermaid Config
wrapbooleanOptionalcannot be nullMermaid Config
fontSizenumberOptionalcannot be nullMermaid Config
markdownAutoWrapbooleanOptionalcannot be nullMermaid Config
suppressErrorRenderingbooleanOptionalcannot 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
"default"

themeVariables ​

themeVariables

  • is optional

  • Type: unknown

  • cannot be null

  • defined in: Mermaid Config

  • tsType: any

themeVariables Type ​

unknown

themeCSS ​

themeCSS

themeCSS Type ​

string

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

handDrawnSeed ​

定义使用手绘外观时要使用的种子。这对于自动化测试很重要,因为它们总是会在没有种子的情况下发现差异。默认值为 0,它给出一个随机种子。

handDrawnSeed

handDrawnSeed Type ​

number

handDrawnSeed Default Value ​

The default value is:

json
0

layout ​

定义用于渲染图表的布局算法。

layout

layout Type ​

string

layout Default Value ​

The default value is:

json
"elk"

maxTextSize ​

用户文本图的最大允许大小

maxTextSize

maxTextSize Type ​

number

maxTextSize Default Value ​

The default value is:

json
50000

maxEdges ​

定义图形中可以绘制的最大边数。

maxEdges

maxEdges Type ​

integer

maxEdges Constraints ​

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

maxEdges Default Value ​

The default value is:

json
500

elk ​

elk

elk Type ​

object (Details)

darkMode ​

darkMode

darkMode Type ​

boolean

darkMode Default Value ​

The default value is:

json
false

htmlLabels ​

用于设置是否应使用 HTML 标签在节点和边上渲染标签的标志。 Note: Diagram-specific htmlLabels settings (e.g., flowchart.htmlLabels) are deprecated. Use this root-level htmlLabels setting instead. The root-level htmlLabels takes precedence over any diagram-specific settings.

htmlLabels

htmlLabels Type ​

boolean

fontFamily ​

指定渲染图表中使用的字体。可以是任何可能的 CSS font-family。 See https://developer.mozilla.org/en-US/docs/Web/CSS/font-family

fontFamily

fontFamily Type ​

string

fontFamily Default Value ​

The default value is:

json
"\"trebuchet ms\", verdana, arial, sans-serif;"

altFontFamily ​

altFontFamily

altFontFamily Type ​

string

logLevel ​

此选项决定 mermaid 要使用的日志量。

logLevel

  • is required

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

logLevel Type ​

any of the following: string or number (Details)

logLevel Constraints ​

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

ValueExplanation
"trace"Equivalent to 0
0
"debug"Equivalent to 1
1
"info"Equivalent to 2
2
"warn"Equivalent to 3
3
"error"Equivalent to 4
4
"fatal"Equivalent to 5 (default)
5

logLevel Default Value ​

The default value is:

json
5

securityLevel ​

解析图表的信任级别

securityLevel

securityLevel Type ​

string

securityLevel Constraints ​

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

ValueExplanation
"strict"(**default**) HTML tags in the text are encoded and click functionality is disabled.
"loose"HTML tags in text are allowed and click functionality is enabled.
"antiscript"HTML tags in text are allowed (only script elements are removed), and click functionality is enabled.
"sandbox"With this security level, all rendering takes place in a sandboxed iframe. This prevent any JavaScript from running in the context. This may hinder interactive functionality of the diagram, like scripts, popups in the sequence diagram, or links to other tabs or targets, etc.

securityLevel Default Value ​

The default value is:

json
"strict"

startOnLoad ​

指示 mermaid 是否在页面加载时启动

startOnLoad

startOnLoad Type ​

boolean

startOnLoad Default Value ​

The default value is:

json
true

arrowMarkerAbsolute ​

控制 html 代码中的箭头标记是绝对路径还是锚点。如果你使用基本标签设置,这很重要。

arrowMarkerAbsolute

arrowMarkerAbsolute Type ​

boolean

arrowMarkerAbsolute Default Value ​

The default value is:

json
false

secure ​

此选项控制哪些 currentConfig 密钥被视为安全,并且只能通过调用 mermaid.initialize 进行更改。这可以防止恶意图形指令覆盖站点的默认安全性。

secure

secure Type ​

string[]

secure Default Value ​

The default value is:

json
["secure", "securityLevel", "startOnLoad", "maxTextSize", "suppressErrorRendering", "maxEdges"]

legacyMathML ​

此选项指定 Mermaid 是否可以期望依赖包含没有自己的 MathML 实现的浏览器的 KaTeX 样式表。如果禁用此选项且不支持 MathML,则数学公式将被替换为警告。如果启用此选项且不支持 MathML,则 Mermaid 将恢复为 KaTeX 的传统渲染。

legacyMathML

legacyMathML Type ​

boolean

legacyMathML Default Value ​

The default value is:

json
false

forceLegacyMathML ​

此选项强制 Mermaid 依赖 KaTeX 自己的样式表来渲染 MathML。由于操作系统字体和浏览器的 MathML 实现之间的差异,如果一致的渲染很重要,建议使用此选项。如果设置为 true,则忽略 legacyMathML。

forceLegacyMathML

forceLegacyMathML Type ​

boolean

forceLegacyMathML Default Value ​

The default value is:

json
false

deterministicIds ​

此选项控制 SVG 中节点的生成 ID 是随机生成的还是基于种子生成的。如果设置为 false,则 ID 将基于当前日期生成,因此不是确定性的。这是默认行为。如果你的文件被签入源代码管理,这很重要,例如 git 并且除非内容发生变化,否则不应更改。

deterministicIds

deterministicIds Type ​

boolean

deterministicIds Default Value ​

The default value is:

json
false

deterministicIDSeed ​

此选项是确定性 ID 的可选种子。如果设置为 undefined 但 deterministicIds 是 true,则使用简单的数字迭代器。你可以设置此属性以基于静态字符串的种子。

deterministicIDSeed

deterministicIDSeed Type ​

string

flowchart ​

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

flowchart

flowchart Type ​

object (Flowchart Diagram Config)

all of

swimlane ​

包含特定于泳道图类型的配置的对象。泳道图重用了流程图渲染器和流程图配置以共享选项(曲线、HTML标签、间距等);此块包含仅影响泳道布局管道的旋钮。

swimlane

swimlane Type ​

object (Swimlane Diagram Config)

all of

agentflow ​

包含特定于 agentflow 图类型配置的对象。Agentflow 通过共享的统一渲染器渲染,因此它拥有与流程图相同的间距和内边距调节。它们存在于自己的区块中,这样就可以调节 agentflow 而不影响页面上的每一个流程图。

agentflow

agentflow Type ​

object (Agentflow Diagram Config)

all of

sequence ​

包含特定于时序图的配置的对象

sequence

sequence Type ​

object (Sequence Diagram Config)

all of

gantt ​

包含特定于甘特图的配置的对象

gantt

gantt Type ​

object (Gantt Diagram Config)

all of

journey ​

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

journey

journey Type ​

object (Journey Diagram Config)

all of

timeline ​

timeline

timeline Type ​

object (Timeline Diagram Config)

all of

class ​

class

class Type ​

object (Class Diagram Config)

all of

state ​

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

state

state Type ​

object (State Diagram Config)

all of

er ​

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

er

er Type ​

object (Er Diagram Config)

all of

pie ​

pie

pie Type ​

object (Pie Diagram Config)

all of

quadrantChart ​

quadrantChart

quadrantChart Type ​

object (Quadrant Chart Config)

all of

xyChart ​

此对象包含特定于 XYCharts 的配置

xyChart

xyChart Type ​

object (XYChart Config)

all of

requirement ​

包含特定于 req 图的配置的对象

requirement

requirement Type ​

object (Requirement Diagram Config)

all of

architecture ​

包含特定于架构图的配置的对象

architecture

architecture Type ​

object (Architecture Diagram Config)

all of

mindmap ​

包含特定于思维导图的配置的对象

mindmap

mindmap Type ​

object (Mindmap Diagram Config)

all of

ishikawa ​

包含针对石川图特定配置的对象

ishikawa

ishikawa Type ​

object (Ishikawa Diagram Config)

all of

kanban ​

包含特定于看板图的配置的对象

kanban

kanban Type ​

object (Kanban Diagram Config)

all of

gitGraph ​

gitGraph

gitGraph Type ​

object (Git Graph Diagram Config)

all of

c4 ​

包含特定于 c4 图的配置的对象

c4

c4 Type ​

object (C4 Diagram Config)

all of

sankey ​

包含特定于桑基图的配置的对象。

sankey

sankey Type ​

object (Sankey Diagram Config)

all of

packet ​

包含特定于数据包图的配置的对象。

packet

packet Type ​

object (Packet Diagram Config)

all of

block ​

包含特定于框图的配置的对象。

block

block Type ​

object (Block Diagram Config)

all of

eventmodeling ​

包含针对事件建模图的特定配置的对象。

eventmodeling

eventmodeling Type ​

object (Event Modeling Diagram Config)

all of

treeView ​

包含针对 treeView 图表的特定配置的对象。

treeView

treeView Type ​

object (TreeView Diagram Config)

all of

radar ​

包含雷达图特定配置的对象。

radar

radar Type ​

object (Radar Diagram Config)

all of

usecase ​

包含用例图特定配置的对象。

usecase

usecase Type ​

object (Usecase Diagram Config)

all of

venn ​

包含针对维恩图的特定配置的对象。

venn

venn Type ​

object (Venn Diagram Config)

all of

wardley-beta ​

包含针对沃德利地图图表的特定配置的对象。

wardley-beta

wardley-beta Type ​

object (Wardley Diagram Config)

all of

cynefin ​

Cynefin 框架图的配置。

cynefin

cynefin Type ​

object (Cynefin Diagram Config)

all of

railroad ​

铁路(语法)图的配置

railroad

railroad Type ​

object (Railroad Diagram Config)

all of

dompurifyConfig ​

传递给 dompurify 库的配置选项。

dompurifyConfig

dompurifyConfig Type ​

object (DOM Purify Configuration)

wrap ​

wrap

wrap Type ​

boolean

fontSize ​

fontSize

fontSize Type ​

number

fontSize Default Value ​

The default value is:

json
16

markdownAutoWrap ​

markdownAutoWrap

markdownAutoWrap Type ​

boolean

markdownAutoWrap Default Value ​

The default value is:

json
true

suppressErrorRendering ​

禁止在 DOM 中插入 'Syntax error' 图。当你想要控制如何处理应用中的语法错误时,这很有用。

suppressErrorRendering

suppressErrorRendering Type ​

boolean

suppressErrorRendering Default Value ​

The default value is:

json
false

Mermaid Config Definitions ​

Definitions group BaseDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/BaseDiagramConfig" }
PropertyTypeRequiredNullableDefined by
useWidthnumberOptionalcannot be nullMermaid Config
useMaxWidthbooleanOptionalcannot be nullMermaid Config
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
layoutstringOptionalcannot be nullMermaid Config

useWidth ​

useWidth

useWidth Type ​

number

useMaxWidth ​

当此标志设置为 true 时,高度和宽度设置为 100%,然后使用可用空间缩放。如果设置为 false,则使用所需的绝对空间。

useMaxWidth

useMaxWidth Type ​

boolean

useMaxWidth Default Value ​

The default value is:

json
true

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

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"

layout ​

定义用于渲染图表的布局算法。

layout

layout Type ​

string

Definitions group C4DiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/C4DiagramConfig" }
PropertyTypeRequiredNullableDefined by
diagramMarginXintegerRequiredcannot be nullMermaid Config
diagramMarginYintegerRequiredcannot be nullMermaid Config
c4ShapeMarginintegerRequiredcannot be nullMermaid Config
c4ShapePaddingintegerRequiredcannot be nullMermaid Config
widthintegerRequiredcannot be nullMermaid Config
heightintegerRequiredcannot be nullMermaid Config
boxMarginintegerRequiredcannot be nullMermaid Config
c4ShapeInRowintegerRequiredcannot be nullMermaid Config
nextLinePaddingXnumberOptionalcannot be nullMermaid Config
c4BoundaryInRowintegerRequiredcannot be nullMermaid Config
personFontSizeMultipleOptionalcannot be nullMermaid Config
personFontFamilystringOptionalcannot be nullMermaid Config
personFontWeightMultipleOptionalcannot be nullMermaid Config
external_personFontSizeMultipleOptionalcannot be nullMermaid Config
external_personFontFamilystringOptionalcannot be nullMermaid Config
external_personFontWeightMultipleOptionalcannot be nullMermaid Config
systemFontSizeMultipleOptionalcannot be nullMermaid Config
systemFontFamilystringOptionalcannot be nullMermaid Config
systemFontWeightMultipleOptionalcannot be nullMermaid Config
external_systemFontSizeMultipleOptionalcannot be nullMermaid Config
external_systemFontFamilystringOptionalcannot be nullMermaid Config
external_systemFontWeightMultipleOptionalcannot be nullMermaid Config
system_dbFontSizeMultipleOptionalcannot be nullMermaid Config
system_dbFontFamilystringOptionalcannot be nullMermaid Config
system_dbFontWeightMultipleOptionalcannot be nullMermaid Config
external_system_dbFontSizeMultipleOptionalcannot be nullMermaid Config
external_system_dbFontFamilystringOptionalcannot be nullMermaid Config
external_system_dbFontWeightMultipleOptionalcannot be nullMermaid Config
system_queueFontSizeMultipleOptionalcannot be nullMermaid Config
system_queueFontFamilystringOptionalcannot be nullMermaid Config
system_queueFontWeightMultipleOptionalcannot be nullMermaid Config
external_system_queueFontSizeMultipleOptionalcannot be nullMermaid Config
external_system_queueFontFamilystringOptionalcannot be nullMermaid Config
external_system_queueFontWeightMultipleOptionalcannot be nullMermaid Config
boundaryFontSizeMultipleOptionalcannot be nullMermaid Config
boundaryFontFamilystringOptionalcannot be nullMermaid Config
boundaryFontWeightMultipleOptionalcannot be nullMermaid Config
messageFontSizeMultipleOptionalcannot be nullMermaid Config
messageFontFamilystringOptionalcannot be nullMermaid Config
messageFontWeightMultipleOptionalcannot be nullMermaid Config
containerFontSizeMultipleOptionalcannot be nullMermaid Config
containerFontFamilystringOptionalcannot be nullMermaid Config
containerFontWeightMultipleOptionalcannot be nullMermaid Config
external_containerFontSizeMultipleOptionalcannot be nullMermaid Config
external_containerFontFamilystringOptionalcannot be nullMermaid Config
external_containerFontWeightMultipleOptionalcannot be nullMermaid Config
container_dbFontSizeMultipleOptionalcannot be nullMermaid Config
container_dbFontFamilystringOptionalcannot be nullMermaid Config
container_dbFontWeightMultipleOptionalcannot be nullMermaid Config
external_container_dbFontSizeMultipleOptionalcannot be nullMermaid Config
external_container_dbFontFamilystringOptionalcannot be nullMermaid Config
external_container_dbFontWeightMultipleOptionalcannot be nullMermaid Config
container_queueFontSizeMultipleOptionalcannot be nullMermaid Config
container_queueFontFamilystringOptionalcannot be nullMermaid Config
container_queueFontWeightMultipleOptionalcannot be nullMermaid Config
external_container_queueFontSizeMultipleOptionalcannot be nullMermaid Config
external_container_queueFontFamilystringOptionalcannot be nullMermaid Config
external_container_queueFontWeightMultipleOptionalcannot be nullMermaid Config
componentFontSizeMultipleOptionalcannot be nullMermaid Config
componentFontFamilystringOptionalcannot be nullMermaid Config
componentFontWeightMultipleOptionalcannot be nullMermaid Config
external_componentFontSizeMultipleOptionalcannot be nullMermaid Config
external_componentFontFamilystringOptionalcannot be nullMermaid Config
external_componentFontWeightMultipleOptionalcannot be nullMermaid Config
component_dbFontSizeMultipleOptionalcannot be nullMermaid Config
component_dbFontFamilystringOptionalcannot be nullMermaid Config
component_dbFontWeightMultipleOptionalcannot be nullMermaid Config
external_component_dbFontSizeMultipleOptionalcannot be nullMermaid Config
external_component_dbFontFamilystringOptionalcannot be nullMermaid Config
external_component_dbFontWeightMultipleOptionalcannot be nullMermaid Config
component_queueFontSizeMultipleOptionalcannot be nullMermaid Config
component_queueFontFamilystringOptionalcannot be nullMermaid Config
component_queueFontWeightMultipleOptionalcannot be nullMermaid Config
external_component_queueFontSizeMultipleOptionalcannot be nullMermaid Config
external_component_queueFontFamilystringOptionalcannot be nullMermaid Config
external_component_queueFontWeightMultipleOptionalcannot be nullMermaid Config
wrapbooleanOptionalcannot be nullMermaid Config
wrapPaddingnumberOptionalcannot be nullMermaid Config
person_bg_colorstringOptionalcannot be nullMermaid Config
person_border_colorstringOptionalcannot be nullMermaid Config
external_person_bg_colorstringOptionalcannot be nullMermaid Config
external_person_border_colorstringOptionalcannot be nullMermaid Config
system_bg_colorstringOptionalcannot be nullMermaid Config
system_border_colorstringOptionalcannot be nullMermaid Config
system_db_bg_colorstringOptionalcannot be nullMermaid Config
system_db_border_colorstringOptionalcannot be nullMermaid Config
system_queue_bg_colorstringOptionalcannot be nullMermaid Config
system_queue_border_colorstringOptionalcannot be nullMermaid Config
external_system_bg_colorstringOptionalcannot be nullMermaid Config
external_system_border_colorstringOptionalcannot be nullMermaid Config
external_system_db_bg_colorstringOptionalcannot be nullMermaid Config
external_system_db_border_colorstringOptionalcannot be nullMermaid Config
external_system_queue_bg_colorstringOptionalcannot be nullMermaid Config
external_system_queue_border_colorstringOptionalcannot be nullMermaid Config
container_bg_colorstringOptionalcannot be nullMermaid Config
container_border_colorstringOptionalcannot be nullMermaid Config
container_db_bg_colorstringOptionalcannot be nullMermaid Config
container_db_border_colorstringOptionalcannot be nullMermaid Config
container_queue_bg_colorstringOptionalcannot be nullMermaid Config
container_queue_border_colorstringOptionalcannot be nullMermaid Config
external_container_bg_colorstringOptionalcannot be nullMermaid Config
external_container_border_colorstringOptionalcannot be nullMermaid Config
external_container_db_bg_colorstringOptionalcannot be nullMermaid Config
external_container_db_border_colorstringOptionalcannot be nullMermaid Config
external_container_queue_bg_colorstringOptionalcannot be nullMermaid Config
external_container_queue_border_colorstringOptionalcannot be nullMermaid Config
component_bg_colorstringOptionalcannot be nullMermaid Config
component_border_colorstringOptionalcannot be nullMermaid Config
component_db_bg_colorstringOptionalcannot be nullMermaid Config
component_db_border_colorstringOptionalcannot be nullMermaid Config
component_queue_bg_colorstringOptionalcannot be nullMermaid Config
component_queue_border_colorstringOptionalcannot be nullMermaid Config
external_component_bg_colorstringOptionalcannot be nullMermaid Config
external_component_border_colorstringOptionalcannot be nullMermaid Config
external_component_db_bg_colorstringOptionalcannot be nullMermaid Config
external_component_db_border_colorstringOptionalcannot be nullMermaid Config
external_component_queue_bg_colorstringOptionalcannot be nullMermaid Config
external_component_queue_border_colorstringOptionalcannot be nullMermaid Config
personFontNot specifiedOptionalcannot be nullMermaid Config
external_personFontNot specifiedOptionalcannot be nullMermaid Config
systemFontNot specifiedOptionalcannot be nullMermaid Config
external_systemFontNot specifiedOptionalcannot be nullMermaid Config
system_dbFontNot specifiedOptionalcannot be nullMermaid Config
external_system_dbFontNot specifiedOptionalcannot be nullMermaid Config
system_queueFontNot specifiedOptionalcannot be nullMermaid Config
external_system_queueFontNot specifiedOptionalcannot be nullMermaid Config
containerFontNot specifiedOptionalcannot be nullMermaid Config
external_containerFontNot specifiedOptionalcannot be nullMermaid Config
container_dbFontNot specifiedOptionalcannot be nullMermaid Config
external_container_dbFontNot specifiedOptionalcannot be nullMermaid Config
container_queueFontNot specifiedOptionalcannot be nullMermaid Config
external_container_queueFontNot specifiedOptionalcannot be nullMermaid Config
componentFontNot specifiedOptionalcannot be nullMermaid Config
external_componentFontNot specifiedOptionalcannot be nullMermaid Config
component_dbFontNot specifiedOptionalcannot be nullMermaid Config
external_component_dbFontNot specifiedOptionalcannot be nullMermaid Config
component_queueFontNot specifiedOptionalcannot be nullMermaid Config
external_component_queueFontNot specifiedOptionalcannot be nullMermaid Config
boundaryFontNot specifiedOptionalcannot be nullMermaid Config
messageFontNot specifiedOptionalcannot be nullMermaid Config

diagramMarginX ​

c4 图右侧和左侧的边距必须为正值。

diagramMarginX

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 ​

c4 图上方和下方的边距必须为正值。

diagramMarginY

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

c4ShapeMargin ​

形状之间的边距

c4ShapeMargin

c4ShapeMargin Type ​

integer

c4ShapeMargin Constraints ​

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

c4ShapeMargin Default Value ​

The default value is:

json
50

c4ShapePadding ​

形状之间的填充

c4ShapePadding

c4ShapePadding Type ​

integer

c4ShapePadding Constraints ​

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

c4ShapePadding Default Value ​

The default value is:

json
20

width ​

人物框的宽度

width

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
216

height ​

人物框的高度

height

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
60

boxMargin ​

框周围的边距

boxMargin

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

c4ShapeInRow ​

每行要放置多少个形状。

c4ShapeInRow

c4ShapeInRow Type ​

integer

c4ShapeInRow Constraints ​

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

c4ShapeInRow Default Value ​

The default value is:

json
4

nextLinePaddingX ​

nextLinePaddingX

nextLinePaddingX Type ​

number

nextLinePaddingX Default Value ​

The default value is:

json
0

c4BoundaryInRow ​

每行要放置多少个边界。

c4BoundaryInRow

c4BoundaryInRow Type ​

integer

c4BoundaryInRow Constraints ​

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

c4BoundaryInRow Default Value ​

The default value is:

json
2

personFontSize ​

这设置了图表的人员形状的字体大小

personFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

personFontSize Type ​

any of the following: string or number (Details)

personFontSize Default Value ​

The default value is:

json
14

personFontFamily ​

这设置了图表的人员形状的字体粗细

personFontFamily

personFontFamily Type ​

string

personFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

personFontWeight ​

这设置了图表的人员形状的字体粗细

personFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

personFontWeight Type ​

any of the following: string or number (Details)

personFontWeight Default Value ​

The default value is:

json
"normal"

external_personFontSize ​

这设置了图表的外部人员形状的字体大小

external_personFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_personFontSize Type ​

any of the following: string or number (Details)

external_personFontSize Default Value ​

The default value is:

json
14

external_personFontFamily ​

这设置了图表的外部人员形状的字体系列

external_personFontFamily

external_personFontFamily Type ​

string

external_personFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_personFontWeight ​

设置图表的外部人员形状的字体粗细

external_personFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_personFontWeight Type ​

any of the following: string or number (Details)

external_personFontWeight Default Value ​

The default value is:

json
"normal"

systemFontSize ​

这设置了图表的系统形状的字体大小

systemFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

systemFontSize Type ​

any of the following: string or number (Details)

systemFontSize Default Value ​

The default value is:

json
14

systemFontFamily ​

这设置了图表的系统形状的字体系列

systemFontFamily

systemFontFamily Type ​

string

systemFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

systemFontWeight ​

这设置了图表的系统形状的字体粗细

systemFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

systemFontWeight Type ​

any of the following: string or number (Details)

systemFontWeight Default Value ​

The default value is:

json
"normal"

external_systemFontSize ​

这设置了图表的外部系统形状的字体大小

external_systemFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_systemFontSize Type ​

any of the following: string or number (Details)

external_systemFontSize Default Value ​

The default value is:

json
14

external_systemFontFamily ​

这设置了图表的外部系统形状的字体系列

external_systemFontFamily

external_systemFontFamily Type ​

string

external_systemFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_systemFontWeight ​

这设置了图表的外部系统形状的字体粗细

external_systemFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_systemFontWeight Type ​

any of the following: string or number (Details)

external_systemFontWeight Default Value ​

The default value is:

json
"normal"

system_dbFontSize ​

这设置了图表的系统数据库形状的字体大小

system_dbFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

system_dbFontSize Type ​

any of the following: string or number (Details)

system_dbFontSize Default Value ​

The default value is:

json
14

system_dbFontFamily ​

这设置了图表的系统 DB 形状的字体系列

system_dbFontFamily

system_dbFontFamily Type ​

string

system_dbFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

system_dbFontWeight ​

这设置了图表的系统数据库形状的字体粗细

system_dbFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

system_dbFontWeight Type ​

any of the following: string or number (Details)

system_dbFontWeight Default Value ​

The default value is:

json
"normal"

external_system_dbFontSize ​

这设置了图表的外部系统数据库形状的字体大小图表

external_system_dbFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_system_dbFontSize Type ​

any of the following: string or number (Details)

external_system_dbFontSize Default Value ​

The default value is:

json
14

external_system_dbFontFamily ​

这设置了图表的外部系统 DB 形状的字体系列

external_system_dbFontFamily

external_system_dbFontFamily Type ​

string

external_system_dbFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_system_dbFontWeight ​

设置图表的外部系统数据库形状的字体粗细

external_system_dbFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_system_dbFontWeight Type ​

any of the following: string or number (Details)

external_system_dbFontWeight Default Value ​

The default value is:

json
"normal"

system_queueFontSize ​

这设置了图表的系统队列形状的字体大小

system_queueFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

system_queueFontSize Type ​

any of the following: string or number (Details)

system_queueFontSize Default Value ​

The default value is:

json
14

system_queueFontFamily ​

这设置了图表的系统队列形状的字体系列

system_queueFontFamily

system_queueFontFamily Type ​

string

system_queueFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

system_queueFontWeight ​

这设置了图表的系统队列形状的字体粗细

system_queueFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

system_queueFontWeight Type ​

any of the following: string or number (Details)

system_queueFontWeight Default Value ​

The default value is:

json
"normal"

external_system_queueFontSize ​

这设置了图表的外部系统队列形状的字体大小

external_system_queueFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_system_queueFontSize Type ​

any of the following: string or number (Details)

external_system_queueFontSize Default Value ​

The default value is:

json
14

external_system_queueFontFamily ​

这设置了图表的外部系统队列形状的字体系列

external_system_queueFontFamily

external_system_queueFontFamily Type ​

string

external_system_queueFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_system_queueFontWeight ​

设置图表的外部系统队列形状的字体粗细图表

external_system_queueFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_system_queueFontWeight Type ​

any of the following: string or number (Details)

external_system_queueFontWeight Default Value ​

The default value is:

json
"normal"

boundaryFontSize ​

这将设置图表的边界形状的字体大小

boundaryFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

boundaryFontSize Type ​

any of the following: string or number (Details)

boundaryFontSize Default Value ​

The default value is:

json
14

boundaryFontFamily ​

设置图表的边界形状的字体系列

boundaryFontFamily

boundaryFontFamily Type ​

string

boundaryFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

boundaryFontWeight ​

这设置了图表的边界形状的字体粗细

boundaryFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

boundaryFontWeight Type ​

any of the following: string or number (Details)

boundaryFontWeight Default Value ​

The default value is:

json
"normal"

messageFontSize ​

这设置了图表的消息形状的字体大小

messageFontSize

  • is optional

  • Type: any of the following: string or number (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
12

messageFontFamily ​

这设置了图表的消息形状的字体系列

messageFontFamily

messageFontFamily Type ​

string

messageFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

messageFontWeight ​

这设置了图表的消息形状的字体粗细

messageFontWeight

  • is optional

  • Type: any of the following: string or number (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
"normal"

containerFontSize ​

这设置了图表的容器形状的字体大小

containerFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

containerFontSize Type ​

any of the following: string or number (Details)

containerFontSize Default Value ​

The default value is:

json
14

containerFontFamily ​

设置图表的容器形状的字体系列

containerFontFamily

containerFontFamily Type ​

string

containerFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

containerFontWeight ​

设置图表的容器形状的字体粗细

containerFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

containerFontWeight Type ​

any of the following: string or number (Details)

containerFontWeight Default Value ​

The default value is:

json
"normal"

external_containerFontSize ​

这设置了图表的外部容器形状的字体大小

external_containerFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_containerFontSize Type ​

any of the following: string or number (Details)

external_containerFontSize Default Value ​

The default value is:

json
14

external_containerFontFamily ​

这设置了图表的外部容器形状的字体系列

external_containerFontFamily

external_containerFontFamily Type ​

string

external_containerFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_containerFontWeight ​

设置图表的外部容器形状的字体粗细

external_containerFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_containerFontWeight Type ​

any of the following: string or number (Details)

external_containerFontWeight Default Value ​

The default value is:

json
"normal"

container_dbFontSize ​

这设置了图表的容器数据库形状的字体大小

container_dbFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

container_dbFontSize Type ​

any of the following: string or number (Details)

container_dbFontSize Default Value ​

The default value is:

json
14

container_dbFontFamily ​

设置图表的容器 DB 形状的字体系列

container_dbFontFamily

container_dbFontFamily Type ​

string

container_dbFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

container_dbFontWeight ​

设置图表的容器数据库形状的字体粗细

container_dbFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

container_dbFontWeight Type ​

any of the following: string or number (Details)

container_dbFontWeight Default Value ​

The default value is:

json
"normal"

external_container_dbFontSize ​

这设置了图表的外部容器数据库形状的字体大小

external_container_dbFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_container_dbFontSize Type ​

any of the following: string or number (Details)

external_container_dbFontSize Default Value ​

The default value is:

json
14

external_container_dbFontFamily ​

设置外部容器的字体系列图表的 DB 形状

external_container_dbFontFamily

external_container_dbFontFamily Type ​

string

external_container_dbFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_container_dbFontWeight ​

设置图表的外部容器数据库形状的字体粗细

external_container_dbFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_container_dbFontWeight Type ​

any of the following: string or number (Details)

external_container_dbFontWeight Default Value ​

The default value is:

json
"normal"

container_queueFontSize ​

这设置了图表的容器队列形状的字体大小

container_queueFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

container_queueFontSize Type ​

any of the following: string or number (Details)

container_queueFontSize Default Value ​

The default value is:

json
14

container_queueFontFamily ​

设置图表的容器队列形状的字体系列

container_queueFontFamily

container_queueFontFamily Type ​

string

container_queueFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

container_queueFontWeight ​

设置图表的容器队列形状的字体粗细

container_queueFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

container_queueFontWeight Type ​

any of the following: string or number (Details)

container_queueFontWeight Default Value ​

The default value is:

json
"normal"

external_container_queueFontSize ​

这设置了图表的外部容器队列形状的字体大小

external_container_queueFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_container_queueFontSize Type ​

any of the following: string or number (Details)

external_container_queueFontSize Default Value ​

The default value is:

json
14

external_container_queueFontFamily ​

这设置了图表的外部容器队列形状的字体系列

external_container_queueFontFamily

external_container_queueFontFamily Type ​

string

external_container_queueFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_container_queueFontWeight ​

设置图表的外部容器队列形状的字体粗细

external_container_queueFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_container_queueFontWeight Type ​

any of the following: string or number (Details)

external_container_queueFontWeight Default Value ​

The default value is:

json
"normal"

componentFontSize ​

这设置了图表的组件形状的字体大小

componentFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

componentFontSize Type ​

any of the following: string or number (Details)

componentFontSize Default Value ​

The default value is:

json
14

componentFontFamily ​

设置图表的组件形状的字体系列

componentFontFamily

componentFontFamily Type ​

string

componentFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

componentFontWeight ​

这设置了图表的组件形状

componentFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

componentFontWeight Type ​

any of the following: string or number (Details)

componentFontWeight Default Value ​

The default value is:

json
"normal"

external_componentFontSize ​

这设置了图表的外部组件形状的字体大小

external_componentFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_componentFontSize Type ​

any of the following: string or number (Details)

external_componentFontSize Default Value ​

The default value is:

json
14

external_componentFontFamily ​

设置图表的外部组件形状的字体系列

external_componentFontFamily

external_componentFontFamily Type ​

string

external_componentFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_componentFontWeight ​

设置图表的外部组件形状的字体粗细

external_componentFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_componentFontWeight Type ​

any of the following: string or number (Details)

external_componentFontWeight Default Value ​

The default value is:

json
"normal"

component_dbFontSize ​

这将设置图表的组件 DB 形状的字体大小

component_dbFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

component_dbFontSize Type ​

any of the following: string or number (Details)

component_dbFontSize Default Value ​

The default value is:

json
14

component_dbFontFamily ​

设置图表的组件 DB 形状的字体系列

component_dbFontFamily

component_dbFontFamily Type ​

string

component_dbFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

component_dbFontWeight ​

这设置了图表的组件数据库形状的字体粗细

component_dbFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

component_dbFontWeight Type ​

any of the following: string or number (Details)

component_dbFontWeight Default Value ​

The default value is:

json
"normal"

external_component_dbFontSize ​

这设置了图表的外部组件数据库形状的字体大小

external_component_dbFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_component_dbFontSize Type ​

any of the following: string or number (Details)

external_component_dbFontSize Default Value ​

The default value is:

json
14

external_component_dbFontFamily ​

设置图表的外部组件 DB 形状的字体系列

external_component_dbFontFamily

external_component_dbFontFamily Type ​

string

external_component_dbFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_component_dbFontWeight ​

设置图表的外部组件数据库形状的字体粗细

external_component_dbFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_component_dbFontWeight Type ​

any of the following: string or number (Details)

external_component_dbFontWeight Default Value ​

The default value is:

json
"normal"

component_queueFontSize ​

这设置了图表的组件队列形状的字体大小

component_queueFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

component_queueFontSize Type ​

any of the following: string or number (Details)

component_queueFontSize Default Value ​

The default value is:

json
14

component_queueFontFamily ​

设置图表的组件队列形状的字体系列

component_queueFontFamily

component_queueFontFamily Type ​

string

component_queueFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

component_queueFontWeight ​

这设置了图表的组件队列形状的字体粗细

component_queueFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

component_queueFontWeight Type ​

any of the following: string or number (Details)

component_queueFontWeight Default Value ​

The default value is:

json
"normal"

external_component_queueFontSize ​

这设置了图表的外部组件队列形状的字体大小

external_component_queueFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_component_queueFontSize Type ​

any of the following: string or number (Details)

external_component_queueFontSize Default Value ​

The default value is:

json
14

external_component_queueFontFamily ​

设置图表的外部组件队列形状的字体系列

external_component_queueFontFamily

external_component_queueFontFamily Type ​

string

external_component_queueFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

external_component_queueFontWeight ​

设置图表的外部组件队列形状的字体粗细

external_component_queueFontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

external_component_queueFontWeight Type ​

any of the following: string or number (Details)

external_component_queueFontWeight Default Value ​

The default value is:

json
"normal"

wrap ​

设置图表的自动换行状态

wrap

wrap Type ​

boolean

wrap Default Value ​

The default value is:

json
true

wrapPadding ​

设置图表的自动换行填充(仅限侧面)

wrapPadding

wrapPadding Type ​

number

wrapPadding Default Value ​

The default value is:

json
10

person_bg_color ​

person_bg_color

person_bg_color Type ​

string

person_bg_color Default Value ​

The default value is:

json
"#08427B"

person_border_color ​

person_border_color

person_border_color Type ​

string

person_border_color Default Value ​

The default value is:

json
"#073B6F"

external_person_bg_color ​

external_person_bg_color

external_person_bg_color Type ​

string

external_person_bg_color Default Value ​

The default value is:

json
"#686868"

external_person_border_color ​

external_person_border_color

external_person_border_color Type ​

string

external_person_border_color Default Value ​

The default value is:

json
"#8A8A8A"

system_bg_color ​

system_bg_color

system_bg_color Type ​

string

system_bg_color Default Value ​

The default value is:

json
"#1168BD"

system_border_color ​

system_border_color

system_border_color Type ​

string

system_border_color Default Value ​

The default value is:

json
"#3C7FC0"

system_db_bg_color ​

system_db_bg_color

system_db_bg_color Type ​

string

system_db_bg_color Default Value ​

The default value is:

json
"#1168BD"

system_db_border_color ​

system_db_border_color

system_db_border_color Type ​

string

system_db_border_color Default Value ​

The default value is:

json
"#3C7FC0"

system_queue_bg_color ​

system_queue_bg_color

system_queue_bg_color Type ​

string

system_queue_bg_color Default Value ​

The default value is:

json
"#1168BD"

system_queue_border_color ​

system_queue_border_color

system_queue_border_color Type ​

string

system_queue_border_color Default Value ​

The default value is:

json
"#3C7FC0"

external_system_bg_color ​

external_system_bg_color

external_system_bg_color Type ​

string

external_system_bg_color Default Value ​

The default value is:

json
"#999999"

external_system_border_color ​

external_system_border_color

external_system_border_color Type ​

string

external_system_border_color Default Value ​

The default value is:

json
"#8A8A8A"

external_system_db_bg_color ​

external_system_db_bg_color

external_system_db_bg_color Type ​

string

external_system_db_bg_color Default Value ​

The default value is:

json
"#999999"

external_system_db_border_color ​

external_system_db_border_color

external_system_db_border_color Type ​

string

external_system_db_border_color Default Value ​

The default value is:

json
"#8A8A8A"

external_system_queue_bg_color ​

external_system_queue_bg_color

external_system_queue_bg_color Type ​

string

external_system_queue_bg_color Default Value ​

The default value is:

json
"#999999"

external_system_queue_border_color ​

external_system_queue_border_color

external_system_queue_border_color Type ​

string

external_system_queue_border_color Default Value ​

The default value is:

json
"#8A8A8A"

container_bg_color ​

container_bg_color

container_bg_color Type ​

string

container_bg_color Default Value ​

The default value is:

json
"#438DD5"

container_border_color ​

container_border_color

container_border_color Type ​

string

container_border_color Default Value ​

The default value is:

json
"#3C7FC0"

container_db_bg_color ​

container_db_bg_color

container_db_bg_color Type ​

string

container_db_bg_color Default Value ​

The default value is:

json
"#438DD5"

container_db_border_color ​

container_db_border_color

container_db_border_color Type ​

string

container_db_border_color Default Value ​

The default value is:

json
"#3C7FC0"

container_queue_bg_color ​

container_queue_bg_color

container_queue_bg_color Type ​

string

container_queue_bg_color Default Value ​

The default value is:

json
"#438DD5"

container_queue_border_color ​

container_queue_border_color

container_queue_border_color Type ​

string

container_queue_border_color Default Value ​

The default value is:

json
"#3C7FC0"

external_container_bg_color ​

external_container_bg_color

external_container_bg_color Type ​

string

external_container_bg_color Default Value ​

The default value is:

json
"#B3B3B3"

external_container_border_color ​

external_container_border_color

external_container_border_color Type ​

string

external_container_border_color Default Value ​

The default value is:

json
"#A6A6A6"

external_container_db_bg_color ​

external_container_db_bg_color

external_container_db_bg_color Type ​

string

external_container_db_bg_color Default Value ​

The default value is:

json
"#B3B3B3"

external_container_db_border_color ​

external_container_db_border_color

external_container_db_border_color Type ​

string

external_container_db_border_color Default Value ​

The default value is:

json
"#A6A6A6"

external_container_queue_bg_color ​

external_container_queue_bg_color

external_container_queue_bg_color Type ​

string

external_container_queue_bg_color Default Value ​

The default value is:

json
"#B3B3B3"

external_container_queue_border_color ​

external_container_queue_border_color

external_container_queue_border_color Type ​

string

external_container_queue_border_color Default Value ​

The default value is:

json
"#A6A6A6"

component_bg_color ​

component_bg_color

component_bg_color Type ​

string

component_bg_color Default Value ​

The default value is:

json
"#85BBF0"

component_border_color ​

component_border_color

component_border_color Type ​

string

component_border_color Default Value ​

The default value is:

json
"#78A8D8"

component_db_bg_color ​

component_db_bg_color

component_db_bg_color Type ​

string

component_db_bg_color Default Value ​

The default value is:

json
"#85BBF0"

component_db_border_color ​

component_db_border_color

component_db_border_color Type ​

string

component_db_border_color Default Value ​

The default value is:

json
"#78A8D8"

component_queue_bg_color ​

component_queue_bg_color

component_queue_bg_color Type ​

string

component_queue_bg_color Default Value ​

The default value is:

json
"#85BBF0"

component_queue_border_color ​

component_queue_border_color

component_queue_border_color Type ​

string

component_queue_border_color Default Value ​

The default value is:

json
"#78A8D8"

external_component_bg_color ​

external_component_bg_color

external_component_bg_color Type ​

string

external_component_bg_color Default Value ​

The default value is:

json
"#CCCCCC"

external_component_border_color ​

external_component_border_color

external_component_border_color Type ​

string

external_component_border_color Default Value ​

The default value is:

json
"#BFBFBF"

external_component_db_bg_color ​

external_component_db_bg_color

external_component_db_bg_color Type ​

string

external_component_db_bg_color Default Value ​

The default value is:

json
"#CCCCCC"

external_component_db_border_color ​

external_component_db_border_color

external_component_db_border_color Type ​

string

external_component_db_border_color Default Value ​

The default value is:

json
"#BFBFBF"

external_component_queue_bg_color ​

external_component_queue_bg_color

external_component_queue_bg_color Type ​

string

external_component_queue_bg_color Default Value ​

The default value is:

json
"#CCCCCC"

external_component_queue_border_color ​

external_component_queue_border_color

external_component_queue_border_color Type ​

string

external_component_queue_border_color Default Value ​

The default value is:

json
"#BFBFBF"

personFont ​

返回 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,
  };
}

personFont

personFont Type ​

unknown (Font Calculator)

external_personFont ​

返回 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,
  };
}

external_personFont

external_personFont Type ​

unknown (Font Calculator)

systemFont ​

返回 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,
  };
}

systemFont

systemFont Type ​

unknown (Font Calculator)

external_systemFont ​

返回 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,
  };
}

external_systemFont

external_systemFont Type ​

unknown (Font Calculator)

system_dbFont ​

返回 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,
  };
}

system_dbFont

system_dbFont Type ​

unknown (Font Calculator)

external_system_dbFont ​

返回 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,
  };
}

external_system_dbFont

external_system_dbFont Type ​

unknown (Font Calculator)

system_queueFont ​

返回 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,
  };
}

system_queueFont

system_queueFont Type ​

unknown (Font Calculator)

external_system_queueFont ​

返回 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,
  };
}

external_system_queueFont

external_system_queueFont Type ​

unknown (Font Calculator)

containerFont ​

返回 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,
  };
}

containerFont

containerFont Type ​

unknown (Font Calculator)

external_containerFont ​

返回 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,
  };
}

external_containerFont

external_containerFont Type ​

unknown (Font Calculator)

container_dbFont ​

返回 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,
  };
}

container_dbFont

container_dbFont Type ​

unknown (Font Calculator)

external_container_dbFont ​

返回 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,
  };
}

external_container_dbFont

external_container_dbFont Type ​

unknown (Font Calculator)

container_queueFont ​

返回 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,
  };
}

container_queueFont

container_queueFont Type ​

unknown (Font Calculator)

external_container_queueFont ​

返回 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,
  };
}

external_container_queueFont

external_container_queueFont Type ​

unknown (Font Calculator)

componentFont ​

返回 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,
  };
}

componentFont

componentFont Type ​

unknown (Font Calculator)

external_componentFont ​

返回 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,
  };
}

external_componentFont

external_componentFont Type ​

unknown (Font Calculator)

component_dbFont ​

返回 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,
  };
}

component_dbFont

component_dbFont Type ​

unknown (Font Calculator)

external_component_dbFont ​

返回 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,
  };
}

external_component_dbFont

external_component_dbFont Type ​

unknown (Font Calculator)

component_queueFont ​

返回 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,
  };
}

component_queueFont

component_queueFont Type ​

unknown (Font Calculator)

external_component_queueFont ​

返回 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,
  };
}

external_component_queueFont

external_component_queueFont Type ​

unknown (Font Calculator)

boundaryFont ​

返回 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,
  };
}

boundaryFont

boundaryFont Type ​

unknown (Font Calculator)

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

messageFont Type ​

unknown (Font Calculator)

Definitions group GitGraphDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/GitGraphDiagramConfig" }
PropertyTypeRequiredNullableDefined by
titleTopMarginintegerRequiredcannot be nullMermaid Config
diagramPaddingnumberOptionalcannot be nullMermaid Config
nodeLabelMergedOptionalcannot be nullMermaid Config
mainBranchNamestringOptionalcannot be nullMermaid Config
mainBranchOrdernumberOptionalcannot be nullMermaid Config
showCommitLabelbooleanOptionalcannot be nullMermaid Config
showBranchesbooleanOptionalcannot be nullMermaid Config
rotateCommitLabelbooleanOptionalcannot be nullMermaid Config
parallelCommitsbooleanOptionalcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot 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

diagramPadding ​

diagramPadding

diagramPadding Type ​

number

diagramPadding Default Value ​

The default value is:

json
8

nodeLabel ​

nodeLabel

nodeLabel Type ​

object (Details)

all of

nodeLabel Default Value ​

The default value is:

json
{
  "width": 75,
  "height": 100,
  "x": -25,
  "y": 0
}

mainBranchName ​

mainBranchName

mainBranchName Type ​

string

mainBranchName Default Value ​

The default value is:

json
"main"

mainBranchOrder ​

mainBranchOrder

mainBranchOrder Type ​

number

mainBranchOrder Default Value ​

The default value is:

json
0

showCommitLabel ​

showCommitLabel

showCommitLabel Type ​

boolean

showCommitLabel Default Value ​

The default value is:

json
true

showBranches ​

showBranches

showBranches Type ​

boolean

showBranches Default Value ​

The default value is:

json
true

rotateCommitLabel ​

rotateCommitLabel

rotateCommitLabel Type ​

boolean

rotateCommitLabel Default Value ​

The default value is:

json
true

parallelCommits ​

parallelCommits

parallelCommits Type ​

boolean

parallelCommits Default Value ​

The default value is:

json
false

arrowMarkerAbsolute ​

控制 html 代码中的箭头标记是绝对路径还是锚点。如果你使用基本标签设置,这很重要。

arrowMarkerAbsolute

arrowMarkerAbsolute Type ​

boolean

arrowMarkerAbsolute Default Value ​

The default value is:

json
false

Definitions group NodeLabel ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/NodeLabel" }
PropertyTypeRequiredNullableDefined by
widthnumberOptionalcannot be nullMermaid Config
heightnumberOptionalcannot be nullMermaid Config
xnumberOptionalcannot be nullMermaid Config
ynumberOptionalcannot be nullMermaid Config

width ​

width

width Type ​

number

height ​

height

height Type ​

number

x ​

x

x Type ​

number

y ​

y

y Type ​

number

Definitions group RequirementDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/RequirementDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
rect_fillstringOptionalcannot be nullMermaid Config
text_colorstringOptionalcannot be nullMermaid Config
rect_border_sizestringOptionalcannot be nullMermaid Config
rect_border_colorstringOptionalcannot be nullMermaid Config
rect_min_widthnumberOptionalcannot be nullMermaid Config
rect_min_heightnumberOptionalcannot be nullMermaid Config
fontSizenumberOptionalcannot be nullMermaid Config
rect_paddingnumberOptionalcannot be nullMermaid Config
line_heightnumberOptionalcannot 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"

rect_fill ​

rect_fill

rect_fill Type ​

string

rect_fill Default Value ​

The default value is:

json
"#f9f9f9"

text_color ​

text_color

text_color Type ​

string

text_color Default Value ​

The default value is:

json
"#333"

rect_border_size ​

rect_border_size

rect_border_size Type ​

string

rect_border_size Default Value ​

The default value is:

json
"0.5px"

rect_border_color ​

rect_border_color

rect_border_color Type ​

string

rect_border_color Default Value ​

The default value is:

json
"#bbb"

rect_min_width ​

rect_min_width

rect_min_width Type ​

number

rect_min_width Default Value ​

The default value is:

json
200

rect_min_height ​

rect_min_height

rect_min_height Type ​

number

rect_min_height Default Value ​

The default value is:

json
200

fontSize ​

fontSize

fontSize Type ​

number

fontSize Default Value ​

The default value is:

json
14

rect_padding ​

rect_padding

rect_padding Type ​

number

rect_padding Default Value ​

The default value is:

json
10

line_height ​

line_height

line_height Type ​

number

line_height Default Value ​

The default value is:

json
20

Definitions group ArchitectureDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/ArchitectureDiagramConfig" }
PropertyTypeRequiredNullableDefined by
paddingnumberRequiredcannot be nullMermaid Config
iconSizenumberRequiredcannot be nullMermaid Config
fontSizenumberRequiredcannot be nullMermaid Config
randomizebooleanRequiredcannot be nullMermaid Config
nodeSeparationnumberRequiredcannot be nullMermaid Config
idealEdgeLengthMultipliernumberRequiredcannot be nullMermaid Config
edgeElasticitynumberRequiredcannot be nullMermaid Config
numIternumberRequiredcannot be nullMermaid Config
seednumberRequiredcannot be nullMermaid Config

padding ​

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
40

iconSize ​

iconSize

iconSize Type ​

number

iconSize Default Value ​

The default value is:

json
80

fontSize ​

fontSize

fontSize Type ​

number

fontSize Default Value ​

The default value is:

json
16

randomize ​

在运行布局算法之前是否随机化初始节点位置。当为 false(默认值)时,节点从确定的初始位置开始。当为 true 时,节点从随机位置开始,这可能产生不同但潜在更合理间距的布局 layouts. Note: randomize: false alone does NOT guarantee identical renders, because the underlying fcose layout still uses Math.random() internally during its constraint solver — use the seed option for full determinism.

randomize

randomize Type ​

boolean

randomize Default Value ​

The default value is:

json
false

nodeSeparation ​

同一组中相邻节点之间的最小间距(以像素为单位),传递给底层 fcose 布局。当许多边共享相同的端口方向时,可增加此值以分开重叠的相邻节点。

nodeSeparation

nodeSeparation Type ​

number

nodeSeparation Default Value ​

The default value is:

json
75

idealEdgeLengthMultiplier ​

将乘数应用于 iconSize,以计算同一组内节点之间边的理想长度。增加该值可增加间距;减少该值可使图表更紧凑。跨组边界的边不受影响,并使用固定的较短长度。

idealEdgeLengthMultiplier

idealEdgeLengthMultiplier Type ​

number

idealEdgeLengthMultiplier Default Value ​

The default value is:

json
1.5

edgeElasticity ​

弹簧弹性(0–1)应用于同一组内节点之间的边,并传递给 fcose。较高的值会将连接的节点拉得更近;较低的值则让布局将它们分开。跨组边界的边不受影响。

edgeElasticity

edgeElasticity Type ​

number

edgeElasticity Default Value ​

The default value is:

json
0.45

numIter ​

fcose 布局算法在停止前运行的最大迭代次数。在大规模或密集连接的图表上提高此值可以获得更高质量,但会增加渲染时间。

numIter

numIter Type ​

number

numIter Default Value ​

The default value is:

json
2500

seed ​

fcose 布局的确定性种子。默认为 1,这会使同一图表的每次渲染产生相同的布局——这是保证视觉回归测试稳定所必需的。设置为 0 可选择不用,并使用未替换的 Math.random(布局在各次渲染之间仍会略有不同,与修复前的行为一致)。任何其他数字都会选择不同的可重现布局变体。

seed

seed Type ​

number

seed Default Value ​

The default value is:

json
1

Definitions group MindmapDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/MindmapDiagramConfig" }
PropertyTypeRequiredNullableDefined by
paddingnumberRequiredcannot be nullMermaid Config
maxNodeWidthnumberRequiredcannot be nullMermaid Config
layoutAlgorithmstringRequiredcannot be nullMermaid Config

padding ​

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
10

maxNodeWidth ​

maxNodeWidth

maxNodeWidth Type ​

number

maxNodeWidth Default Value ​

The default value is:

json
200

layoutAlgorithm ​

用于定位思维导图节点的布局算法

layoutAlgorithm

layoutAlgorithm Type ​

string

layoutAlgorithm Default Value ​

The default value is:

json
"cose-bilkent"

Definitions group IshikawaDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/IshikawaDiagramConfig" }
PropertyTypeRequiredNullableDefined by
diagramPaddingintegerOptionalcannot be nullMermaid Config
useMaxWidthbooleanOptionalcannot be nullMermaid Config

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

useMaxWidth ​

useMaxWidth

useMaxWidth Type ​

boolean

useMaxWidth Default Value ​

The default value is:

json
false

Definitions group KanbanDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/KanbanDiagramConfig" }
PropertyTypeRequiredNullableDefined by
paddingnumberOptionalcannot be nullMermaid Config
sectionWidthnumberOptionalcannot be nullMermaid Config
ticketBaseUrlstringOptionalcannot be nullMermaid Config

padding ​

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
8

sectionWidth ​

sectionWidth

sectionWidth Type ​

number

sectionWidth Default Value ​

The default value is:

json
200

ticketBaseUrl ​

ticketBaseUrl

ticketBaseUrl Type ​

string

ticketBaseUrl Default Value ​

The default value is:

json
""

Definitions group PieDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/PieDiagramConfig" }
PropertyTypeRequiredNullableDefined by
textPositionnumberOptionalcannot be nullMermaid Config
donutHolenumberOptionalcannot be nullMermaid Config
legendPositionstringOptionalcannot be nullMermaid Config
highlightSlicestringOptionalcannot be nullMermaid Config

textPosition ​

切片标签的轴向位置从中心的零到外边缘的 1。

textPosition

textPosition Type ​

number

textPosition Constraints ​

maximum: the value of this number must smaller than or equal to: 1

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

textPosition Default Value ​

The default value is:

json
0.75

donutHole ​

甜甜圈孔比例。有效值范围是0到0.9。默认值为0。

donutHole

donutHole Type ​

number

donutHole Constraints ​

maximum: the value of this number must smaller than or equal to: 0.9

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

donutHole Default Value ​

The default value is:

json
0

legendPosition ​

图例相对于图表的位置。默认为右侧。

legendPosition

legendPosition Type ​

string

legendPosition Constraints ​

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

ValueExplanation
"top"
"bottom"
"left"
"right"
"center"

legendPosition Default Value ​

The default value is:

json
"right"

highlightSlice ​

高亮具有匹配标签的特定切片。设置为 'hover' 以高亮悬停的切片。

highlightSlice

highlightSlice Type ​

string

highlightSlice Default Value ​

The default value is:

json
""

Definitions group QuadrantChartConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/QuadrantChartConfig" }
PropertyTypeRequiredNullableDefined by
chartWidthnumberRequiredcannot be nullMermaid Config
chartHeightnumberRequiredcannot be nullMermaid Config
titleFontSizenumberRequiredcannot be nullMermaid Config
titlePaddingnumberRequiredcannot be nullMermaid Config
quadrantPaddingnumberRequiredcannot be nullMermaid Config
xAxisLabelPaddingnumberRequiredcannot be nullMermaid Config
yAxisLabelPaddingnumberRequiredcannot be nullMermaid Config
xAxisLabelFontSizenumberRequiredcannot be nullMermaid Config
yAxisLabelFontSizenumberRequiredcannot be nullMermaid Config
quadrantLabelFontSizenumberRequiredcannot be nullMermaid Config
quadrantTextTopPaddingnumberRequiredcannot be nullMermaid Config
pointTextPaddingnumberRequiredcannot be nullMermaid Config
pointLabelFontSizenumberRequiredcannot be nullMermaid Config
pointRadiusnumberRequiredcannot be nullMermaid Config
xAxisPositionstringRequiredcannot be nullMermaid Config
yAxisPositionstringRequiredcannot be nullMermaid Config
quadrantInternalBorderStrokeWidthnumberRequiredcannot be nullMermaid Config
quadrantExternalBorderStrokeWidthnumberRequiredcannot be nullMermaid Config

chartWidth ​

图表宽度

chartWidth

chartWidth Type ​

number

chartWidth Constraints ​

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

chartWidth Default Value ​

The default value is:

json
500

chartHeight ​

图表高度

chartHeight

chartHeight Type ​

number

chartHeight Constraints ​

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

chartHeight Default Value ​

The default value is:

json
500

titleFontSize ​

图表标题顶部和底部填充

titleFontSize

titleFontSize Type ​

number

titleFontSize Constraints ​

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

titleFontSize Default Value ​

The default value is:

json
20

titlePadding ​

象限正方形周围的填充

titlePadding

titlePadding Type ​

number

titlePadding Constraints ​

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

titlePadding Default Value ​

The default value is:

json
10

quadrantPadding ​

如果象限在顶部渲染,则象限标题从顶部填充

quadrantPadding

quadrantPadding Type ​

number

quadrantPadding Constraints ​

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

quadrantPadding Default Value ​

The default value is:

json
5

xAxisLabelPadding ​

x 轴标签周围的填充

xAxisLabelPadding

xAxisLabelPadding Type ​

number

xAxisLabelPadding Constraints ​

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

xAxisLabelPadding Default Value ​

The default value is:

json
5

yAxisLabelPadding ​

y 轴标签周围的填充

yAxisLabelPadding

yAxisLabelPadding Type ​

number

yAxisLabelPadding Constraints ​

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

yAxisLabelPadding Default Value ​

The default value is:

json
5

xAxisLabelFontSize ​

x 轴标签字体大小

xAxisLabelFontSize

xAxisLabelFontSize Type ​

number

xAxisLabelFontSize Constraints ​

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

xAxisLabelFontSize Default Value ​

The default value is:

json
16

yAxisLabelFontSize ​

y 轴标签字体大小

yAxisLabelFontSize

yAxisLabelFontSize Type ​

number

yAxisLabelFontSize Constraints ​

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

yAxisLabelFontSize Default Value ​

The default value is:

json
16

quadrantLabelFontSize ​

象限标题字体大小

quadrantLabelFontSize

quadrantLabelFontSize Type ​

number

quadrantLabelFontSize Constraints ​

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

quadrantLabelFontSize Default Value ​

The default value is:

json
16

quadrantTextTopPadding ​

如果象限在顶部渲染,则象限标题从顶部填充

quadrantTextTopPadding

quadrantTextTopPadding Type ​

number

quadrantTextTopPadding Constraints ​

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

quadrantTextTopPadding Default Value ​

The default value is:

json
5

pointTextPadding ​

点和点标签之间的填充

pointTextPadding

pointTextPadding Type ​

number

pointTextPadding Constraints ​

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

pointTextPadding Default Value ​

The default value is:

json
5

pointLabelFontSize ​

点标题字体大小

pointLabelFontSize

pointLabelFontSize Type ​

number

pointLabelFontSize Constraints ​

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

pointLabelFontSize Default Value ​

The default value is:

json
12

pointRadius ​

要绘制的点的半径

pointRadius

pointRadius Type ​

number

pointRadius Constraints ​

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

pointRadius Default Value ​

The default value is:

json
5

xAxisPosition ​

x 轴标签的位置

xAxisPosition

xAxisPosition Type ​

string

xAxisPosition Constraints ​

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

ValueExplanation
"top"
"bottom"

xAxisPosition Default Value ​

The default value is:

json
"top"

yAxisPosition ​

y 轴标签的位置

yAxisPosition

yAxisPosition Type ​

string

yAxisPosition Constraints ​

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

ValueExplanation
"left"
"right"

yAxisPosition Default Value ​

The default value is:

json
"left"

quadrantInternalBorderStrokeWidth ​

象限内的框边缘的描边宽度

quadrantInternalBorderStrokeWidth

quadrantInternalBorderStrokeWidth Type ​

number

quadrantInternalBorderStrokeWidth Constraints ​

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

quadrantInternalBorderStrokeWidth Default Value ​

The default value is:

json
1

quadrantExternalBorderStrokeWidth ​

象限外的框边缘的描边宽度

quadrantExternalBorderStrokeWidth

quadrantExternalBorderStrokeWidth Type ​

number

quadrantExternalBorderStrokeWidth Constraints ​

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

quadrantExternalBorderStrokeWidth Default Value ​

The default value is:

json
2

Definitions group XYChartAxisConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/XYChartAxisConfig" }
PropertyTypeRequiredNullableDefined by
showLabelbooleanRequiredcannot be nullMermaid Config
labelFontSizenumberRequiredcannot be nullMermaid Config
labelPaddingnumberRequiredcannot be nullMermaid Config
showTitlebooleanRequiredcannot be nullMermaid Config
titleFontSizenumberRequiredcannot be nullMermaid Config
titlePaddingnumberRequiredcannot be nullMermaid Config
showTickbooleanRequiredcannot be nullMermaid Config
tickLengthnumberRequiredcannot be nullMermaid Config
tickWidthnumberRequiredcannot be nullMermaid Config
showAxisLinebooleanRequiredcannot be nullMermaid Config
axisLineWidthnumberRequiredcannot be nullMermaid Config
labelRotationnumberRequiredcannot be nullMermaid Config

showLabel ​

应显示轴标签(刻度文本)

showLabel

showLabel Type ​

boolean

showLabel Default Value ​

The default value is:

json
true

labelFontSize ​

轴标签的字体大小(刻度文本)

labelFontSize

labelFontSize Type ​

number

labelFontSize Constraints ​

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

labelFontSize Default Value ​

The default value is:

json
14

labelPadding ​

轴标签(刻度文本)的顶部和底部空间

labelPadding

labelPadding Type ​

number

labelPadding Constraints ​

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

labelPadding Default Value ​

The default value is:

json
5

showTitle ​

应显示轴标题

showTitle

showTitle Type ​

boolean

showTitle Default Value ​

The default value is:

json
true

titleFontSize ​

轴标题的字体大小

titleFontSize

titleFontSize Type ​

number

titleFontSize Constraints ​

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

titleFontSize Default Value ​

The default value is:

json
16

titlePadding ​

轴标题的顶部和底部空间

titlePadding

titlePadding Type ​

number

titlePadding Constraints ​

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

titlePadding Default Value ​

The default value is:

json
5

showTick ​

应显示轴刻度线

showTick

showTick Type ​

boolean

showTick Default Value ​

The default value is:

json
true

tickLength ​

轴刻度线的长度

tickLength

tickLength Type ​

number

tickLength Constraints ​

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

tickLength Default Value ​

The default value is:

json
5

tickWidth ​

轴刻度线的宽度

tickWidth

tickWidth Type ​

number

tickWidth Constraints ​

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

tickWidth Default Value ​

The default value is:

json
2

showAxisLine ​

显示跨轴线

showAxisLine

showAxisLine Type ​

boolean

showAxisLine Default Value ​

The default value is:

json
true

axisLineWidth ​

轴线的宽度

axisLineWidth

axisLineWidth Type ​

number

axisLineWidth Constraints ​

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

axisLineWidth Default Value ​

The default value is:

json
2

labelRotation ​

标签旋转角度

labelRotation

labelRotation Type ​

number

labelRotation Constraints ​

maximum: the value of this number must smaller than or equal to: 90

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

labelRotation Default Value ​

The default value is:

json
0

Definitions group XYChartConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/XYChartConfig" }
PropertyTypeRequiredNullableDefined by
widthnumberRequiredcannot be nullMermaid Config
heightnumberRequiredcannot be nullMermaid Config
titleFontSizenumberRequiredcannot be nullMermaid Config
titlePaddingnumberRequiredcannot be nullMermaid Config
showDataLabelbooleanOptionalcannot be nullMermaid Config
showDataLabelOutsideBarbooleanOptionalcannot be nullMermaid Config
showTitlebooleanRequiredcannot be nullMermaid Config
showLegendbooleanOptionalcannot be nullMermaid Config
legendFontSizenumberOptionalcannot be nullMermaid Config
legendPaddingnumberOptionalcannot be nullMermaid Config
xAxisobjectRequiredcannot be nullMermaid Config
yAxisobjectRequiredcannot be nullMermaid Config
chartOrientationNot specifiedRequiredcannot be nullMermaid Config
plotReservedSpacePercentnumberRequiredcannot be nullMermaid Config

width ​

图表的宽度

width

width Type ​

number

width Constraints ​

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

width Default Value ​

The default value is:

json
700

height ​

图表的高度

height

height Type ​

number

height Constraints ​

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

height Default Value ​

The default value is:

json
500

titleFontSize ​

图表标题的字体大小

titleFontSize

titleFontSize Type ​

number

titleFontSize Constraints ​

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

titleFontSize Default Value ​

The default value is:

json
20

titlePadding ​

图表标题的顶部和底部空间

titlePadding

titlePadding Type ​

number

titlePadding Constraints ​

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

titlePadding Default Value ​

The default value is:

json
10

showDataLabel ​

应在栏内显示与栏对应的值

showDataLabel

showDataLabel Type ​

boolean

showDataLabel Default Value ​

The default value is:

json
false

showDataLabelOutsideBar ​

如果显示数据标签,则将其显示在条形外部

showDataLabelOutsideBar

showDataLabelOutsideBar Type ​

boolean

showDataLabelOutsideBar Default Value ​

The default value is:

json
false

showTitle ​

应显示图表标题

showTitle

showTitle Type ​

boolean

showTitle Default Value ​

The default value is:

json
true

showLegend ​

应该为命名的图表显示图例

showLegend

showLegend Type ​

boolean

showLegend Default Value ​

The default value is:

json
true

legendFontSize ​

图例文本的字体大小

legendFontSize

legendFontSize Type ​

number

legendFontSize Constraints ​

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

legendFontSize Default Value ​

The default value is:

json
14

legendPadding ​

图例周围的间距

legendPadding

legendPadding Type ​

number

legendPadding Constraints ​

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

legendPadding Default Value ​

The default value is:

json
10

xAxis ​

此对象包含 XYChart 轴配置的配置

xAxis

xAxis Type ​

object (XYChart axis config)

xAxis Default Value ​

The default value is:

json
{
  "$ref": "#/$defs/XYChartAxisConfig",
  "title": "XYChart axis config",
  "description": "此对象包含 XYChart 轴配置的配置",
  "type": "object",
  "unevaluatedProperties": true,
  "required": [
    "showLabel",
    "labelFontSize",
    "labelPadding",
    "showTitle",
    "titleFontSize",
    "titlePadding",
    "showTick",
    "tickLength",
    "tickWidth",
    "showAxisLine",
    "axisLineWidth",
    "labelRotation"
  ],
  "properties": {
    "showLabel": {
      "description": "应显示轴标签(刻度文本)",
      "type": "boolean",
      "default": true
    },
    "labelFontSize": {
      "description": "轴标签的字体大小(刻度文本)",
      "type": "number",
      "default": 14,
      "minimum": 1
    },
    "labelPadding": {
      "description": "轴标签(刻度文本)的顶部和底部空间",
      "type": "number",
      "default": 5,
      "minimum": 0
    },
    "showTitle": {
      "description": "应显示轴标题",
      "type": "boolean",
      "default": true
    },
    "titleFontSize": {
      "description": "轴标题的字体大小",
      "type": "number",
      "default": 16,
      "minimum": 1
    },
    "titlePadding": {
      "description": "轴标题的顶部和底部空间",
      "type": "number",
      "default": 5,
      "minimum": 0
    },
    "showTick": {
      "description": "应显示轴刻度线",
      "type": "boolean",
      "default": true
    },
    "tickLength": {
      "description": "轴刻度线的长度",
      "type": "number",
      "default": 5,
      "minimum": 1
    },
    "tickWidth": {
      "description": "轴刻度线的宽度",
      "type": "number",
      "default": 2,
      "minimum": 1
    },
    "showAxisLine": {
      "description": "显示跨轴线",
      "type": "boolean",
      "default": true
    },
    "axisLineWidth": {
      "description": "轴线的宽度",
      "type": "number",
      "default": 2,
      "minimum": 1
    },
    "labelRotation": {
      "description": "标签旋转角度",
      "type": "number",
      "default": 0,
      "minimum": -90,
      "maximum": 90
    }
  }
}

yAxis ​

此对象包含 XYChart 轴配置的配置

yAxis

yAxis Type ​

object (XYChart axis config)

yAxis Default Value ​

The default value is:

json
{
  "$ref": "#/$defs/XYChartAxisConfig",
  "title": "XYChart axis config",
  "description": "此对象包含 XYChart 轴配置的配置",
  "type": "object",
  "unevaluatedProperties": true,
  "required": [
    "showLabel",
    "labelFontSize",
    "labelPadding",
    "showTitle",
    "titleFontSize",
    "titlePadding",
    "showTick",
    "tickLength",
    "tickWidth",
    "showAxisLine",
    "axisLineWidth",
    "labelRotation"
  ],
  "properties": {
    "showLabel": {
      "description": "应显示轴标签(刻度文本)",
      "type": "boolean",
      "default": true
    },
    "labelFontSize": {
      "description": "轴标签的字体大小(刻度文本)",
      "type": "number",
      "default": 14,
      "minimum": 1
    },
    "labelPadding": {
      "description": "轴标签(刻度文本)的顶部和底部空间",
      "type": "number",
      "default": 5,
      "minimum": 0
    },
    "showTitle": {
      "description": "应显示轴标题",
      "type": "boolean",
      "default": true
    },
    "titleFontSize": {
      "description": "轴标题的字体大小",
      "type": "number",
      "default": 16,
      "minimum": 1
    },
    "titlePadding": {
      "description": "轴标题的顶部和底部空间",
      "type": "number",
      "default": 5,
      "minimum": 0
    },
    "showTick": {
      "description": "应显示轴刻度线",
      "type": "boolean",
      "default": true
    },
    "tickLength": {
      "description": "轴刻度线的长度",
      "type": "number",
      "default": 5,
      "minimum": 1
    },
    "tickWidth": {
      "description": "轴刻度线的宽度",
      "type": "number",
      "default": 2,
      "minimum": 1
    },
    "showAxisLine": {
      "description": "显示跨轴线",
      "type": "boolean",
      "default": true
    },
    "axisLineWidth": {
      "description": "轴线的宽度",
      "type": "number",
      "default": 2,
      "minimum": 1
    },
    "labelRotation": {
      "description": "标签旋转角度",
      "type": "number",
      "default": 0,
      "minimum": -90,
      "maximum": 90
    }
  }
}

chartOrientation ​

如何绘制水平或垂直图形

chartOrientation

  • is required

  • Type: unknown

  • cannot be null

  • defined in: Mermaid Config

  • tsType: "vertical" | "horizontal"

chartOrientation Type ​

unknown

chartOrientation Default Value ​

The default value is:

json
"vertical"

plotReservedSpacePercent ​

图表占用的空间图的最小百分比

plotReservedSpacePercent

plotReservedSpacePercent Type ​

number

plotReservedSpacePercent Constraints ​

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

plotReservedSpacePercent Default Value ​

The default value is:

json
50

Definitions group ErDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/ErDiagramConfig" }
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

Definitions group StateDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/StateDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
layoutstringOptionalcannot be nullMermaid Config
wrappingWidthnumberRequiredcannot be nullMermaid Config
minNodeWidthnumberRequiredcannot be nullMermaid Config
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

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"

layout ​

定义用于渲染图表的布局算法。

layout

layout Type ​

string

layout Default Value ​

The default value is:

json
"elk"

wrappingWidth ​

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

wrappingWidth

wrappingWidth Type ​

number

wrappingWidth Default Value ​

The default value is:

json
120

minNodeWidth ​

节点标签区域的最小宽度。比这个宽的标签会被加宽,所以短文本的节点也会有统一的宽度;节点自身的内边距会叠加上去,就像 wrappingWidth 的情况一样。设置了明确宽度的节点不受影响。

minNodeWidth

minNodeWidth Type ​

number

minNodeWidth Default Value ​

The default value is:

json
120

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

Definitions group ClassDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/ClassDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
titleTopMarginintegerRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
dividerMarginnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
textHeightnumberOptionalcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
diagramPaddingintegerOptionalcannot be nullMermaid Config
htmlLabelsbooleanOptionalcannot be nullMermaid Config
hideEmptyMembersBoxbooleanOptionalcannot be nullMermaid Config
hierarchicalNamespacesbooleanOptionalcannot 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

arrowMarkerAbsolute ​

控制 html 代码中的箭头标记是绝对路径还是锚点。如果你使用基本标签设置,这很重要。

arrowMarkerAbsolute

arrowMarkerAbsolute Type ​

boolean

arrowMarkerAbsolute Default Value ​

The default value is:

json
false

dividerMargin ​

dividerMargin

dividerMargin Type ​

number

dividerMargin Default Value ​

The default value is:

json
10

padding ​

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
5

textHeight ​

textHeight

textHeight Type ​

number

textHeight 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

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 ​

htmlLabels

htmlLabels Type ​

boolean

htmlLabels Default Value ​

The default value is:

json
false

hideEmptyMembersBox ​

hideEmptyMembersBox

hideEmptyMembersBox Type ​

boolean

hideEmptyMembersBox Default Value ​

The default value is:

json
false

hierarchicalNamespaces ​

当为 true(默认值)时,嵌套命名空间将渲染为层次聚类,点分名称的每个部分(例如 A.B.C)都会成为其自己的嵌套 box. When false, namespaces render in compact mode: only explicitly declared namespaces are emitted and their full qualified name is used as a single flat label.

hierarchicalNamespaces

hierarchicalNamespaces Type ​

boolean

hierarchicalNamespaces Default Value ​

The default value is:

json
true

Definitions group JourneyDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/JourneyDiagramConfig" }
PropertyTypeRequiredNullableDefined by
diagramMarginXintegerRequiredcannot be nullMermaid Config
diagramMarginYintegerRequiredcannot be nullMermaid Config
leftMarginintegerRequiredcannot be nullMermaid Config
maxLabelWidthintegerOptionalcannot be nullMermaid Config
widthintegerRequiredcannot be nullMermaid Config
heightintegerRequiredcannot be nullMermaid Config
boxMarginintegerRequiredcannot be nullMermaid Config
boxTextMarginintegerRequiredcannot be nullMermaid Config
noteMarginintegerRequiredcannot be nullMermaid Config
messageMarginintegerRequiredcannot be nullMermaid Config
messageAlignstringRequiredcannot be nullMermaid Config
bottomMarginAdjintegerRequiredcannot be nullMermaid Config
rightAnglesbooleanRequiredcannot be nullMermaid Config
taskFontSizeMultipleOptionalcannot be nullMermaid Config
taskFontFamilystringOptionalcannot be nullMermaid Config
taskMarginnumberOptionalcannot be nullMermaid Config
activationWidthnumberOptionalcannot be nullMermaid Config
textPlacementstringOptionalcannot be nullMermaid Config
actorColoursarrayOptionalcannot be nullMermaid Config
sectionFillsarrayOptionalcannot be nullMermaid Config
sectionColoursarrayOptionalcannot be nullMermaid Config
titleColorstringRequiredcannot be nullMermaid Config
titleFontFamilystringRequiredcannot be nullMermaid Config
titleFontSizestringRequiredcannot be nullMermaid Config

diagramMarginX ​

c4 图右侧和左侧的边距必须为正值。

diagramMarginX

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 ​

c4 图上方和下方的边距必须为正值。

diagramMarginY

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

leftMargin ​

角色之间的边距

leftMargin

leftMargin Type ​

integer

leftMargin Constraints ​

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

leftMargin Default Value ​

The default value is:

json
150

maxLabelWidth ​

角色标签的最大宽度

maxLabelWidth

maxLabelWidth Type ​

integer

maxLabelWidth Default Value ​

The default value is:

json
360

width ​

参与者框的宽度

width

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

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

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

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

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

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

messageAlign Type ​

string

messageAlign Constraints ​

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

ValueExplanation
"left"
"center"
"right"

messageAlign Default Value ​

The default value is:

json
"center"

bottomMarginAdj ​

向下延长图表的边缘。根据 css 样式,这可能需要调整。

bottomMarginAdj

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

rightAngles Type ​

boolean

rightAngles Default Value ​

The default value is:

json
false

taskFontSize ​

taskFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

taskFontSize Type ​

any of the following: string or number (Details)

taskFontSize Default Value ​

The default value is:

json
14

taskFontFamily ​

taskFontFamily

taskFontFamily Type ​

string

taskFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

taskMargin ​

taskMargin

taskMargin Type ​

number

taskMargin Default Value ​

The default value is:

json
50

activationWidth ​

激活框的宽度

activationWidth

activationWidth Type ​

number

activationWidth Default Value ​

The default value is:

json
10

textPlacement ​

text placement as: tspan | fo | old only text as before

textPlacement

textPlacement Type ​

string

textPlacement Default Value ​

The default value is:

json
"fo"

actorColours ​

actorColours

actorColours Type ​

string[]

actorColours Default Value ​

The default value is:

json
["#8FBC8F", "#7CFC00", "#00FFFF", "#20B2AA", "#B0E0E6", "#FFFFE0"]

sectionFills ​

sectionFills

sectionFills Type ​

string[]

sectionFills Default Value ​

The default value is:

json
["#191970", "#8B008B", "#4B0082", "#2F4F4F", "#800000", "#8B4513", "#00008B"]

sectionColours ​

sectionColours

sectionColours Type ​

string[]

sectionColours Default Value ​

The default value is:

json
["#fff"]

titleColor ​

旅程图中标题文本的颜色

titleColor

titleColor Type ​

string

titleColor Default Value ​

The default value is:

json
""

titleFontFamily ​

旅程图中标题文本使用的字体系列

titleFontFamily

titleFontFamily Type ​

string

titleFontFamily Default Value ​

The default value is:

json
"\"trebuchet ms\", verdana, arial, sans-serif"

titleFontSize ​

旅程图中标题文本使用的字体大小

titleFontSize

titleFontSize Type ​

string

titleFontSize Default Value ​

The default value is:

json
"4ex"

Definitions group TimelineDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/TimelineDiagramConfig" }
PropertyTypeRequiredNullableDefined by
diagramMarginXintegerRequiredcannot be nullMermaid Config
diagramMarginYintegerRequiredcannot be nullMermaid Config
leftMarginintegerRequiredcannot be nullMermaid Config
widthintegerRequiredcannot be nullMermaid Config
heightintegerRequiredcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
boxMarginintegerRequiredcannot be nullMermaid Config
boxTextMarginintegerRequiredcannot be nullMermaid Config
noteMarginintegerRequiredcannot be nullMermaid Config
messageMarginintegerRequiredcannot be nullMermaid Config
messageAlignstringRequiredcannot be nullMermaid Config
bottomMarginAdjintegerRequiredcannot be nullMermaid Config
rightAnglesbooleanOptionalcannot be nullMermaid Config
taskFontSizeMultipleOptionalcannot be nullMermaid Config
taskFontFamilystringOptionalcannot be nullMermaid Config
taskMarginnumberOptionalcannot be nullMermaid Config
activationWidthnumberOptionalcannot be nullMermaid Config
textPlacementstringOptionalcannot be nullMermaid Config
actorColoursarrayOptionalcannot be nullMermaid Config
sectionFillsarrayOptionalcannot be nullMermaid Config
sectionColoursarrayOptionalcannot be nullMermaid Config
disableMulticolorbooleanOptionalcannot be nullMermaid Config

diagramMarginX ​

c4 图右侧和左侧的边距必须为正值。

diagramMarginX

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 ​

c4 图上方和下方的边距必须为正值。

diagramMarginY

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

leftMargin ​

角色之间的边距

leftMargin

leftMargin Type ​

integer

leftMargin Constraints ​

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

leftMargin Default Value ​

The default value is:

json
150

width ​

参与者框的宽度

width

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

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

padding ​

padding

padding Type ​

number

boxMargin ​

循环框周围的边距

boxMargin

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

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

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

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

messageAlign Type ​

string

messageAlign Constraints ​

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

ValueExplanation
"left"
"center"
"right"

messageAlign Default Value ​

The default value is:

json
"center"

bottomMarginAdj ​

向下延长图表的边缘。根据 css 样式,这可能需要调整。

bottomMarginAdj

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

rightAngles Type ​

boolean

rightAngles Default Value ​

The default value is:

json
false

taskFontSize ​

taskFontSize

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

taskFontSize Type ​

any of the following: string or number (Details)

taskFontSize Default Value ​

The default value is:

json
14

taskFontFamily ​

taskFontFamily

taskFontFamily Type ​

string

taskFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

taskMargin ​

taskMargin

taskMargin Type ​

number

taskMargin Default Value ​

The default value is:

json
50

activationWidth ​

激活框的宽度

activationWidth

activationWidth Type ​

number

activationWidth Default Value ​

The default value is:

json
10

textPlacement ​

text placement as: tspan | fo | old only text as before

textPlacement

textPlacement Type ​

string

textPlacement Default Value ​

The default value is:

json
"fo"

actorColours ​

actorColours

actorColours Type ​

string[]

actorColours Default Value ​

The default value is:

json
["#8FBC8F", "#7CFC00", "#00FFFF", "#20B2AA", "#B0E0E6", "#FFFFE0"]

sectionFills ​

sectionFills

sectionFills Type ​

string[]

sectionFills Default Value ​

The default value is:

json
["#191970", "#8B008B", "#4B0082", "#2F4F4F", "#800000", "#8B4513", "#00008B"]

sectionColours ​

sectionColours

sectionColours Type ​

string[]

sectionColours Default Value ​

The default value is:

json
["#fff"]

disableMulticolor ​

disableMulticolor

disableMulticolor Type ​

boolean

disableMulticolor Default Value ​

The default value is:

json
false

Definitions group GanttDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/GanttDiagramConfig" }
PropertyTypeRequiredNullableDefined by
titleTopMarginintegerRequiredcannot be nullMermaid Config
barHeightintegerRequiredcannot be nullMermaid Config
barGapintegerOptionalcannot be nullMermaid Config
topPaddingintegerRequiredcannot be nullMermaid Config
rightPaddingintegerRequiredcannot be nullMermaid Config
leftPaddingintegerRequiredcannot be nullMermaid Config
gridLineStartPaddingintegerRequiredcannot be nullMermaid Config
fontSizeintegerRequiredcannot be nullMermaid Config
sectionFontSizeintegerRequiredcannot be nullMermaid Config
numberSectionStylesintegerRequiredcannot be nullMermaid Config
axisFormatstringRequiredcannot be nullMermaid Config
tickIntervalstringOptionalcannot be nullMermaid Config
topAxisbooleanRequiredcannot be nullMermaid Config
displayModestringOptionalcannot be nullMermaid Config
weekdaystringRequiredcannot 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

barHeight ​

图形中条形的高度

barHeight

barHeight Type ​

integer

barHeight Constraints ​

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

barHeight Default Value ​

The default value is:

json
20

barGap ​

甘特图中不同活动之间的边距

barGap

barGap Type ​

integer

barGap Constraints ​

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

barGap Default Value ​

The default value is:

json
4

topPadding ​

标题和甘特图之间以及轴和甘特图之间的边距。

topPadding

topPadding Type ​

integer

topPadding Constraints ​

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

topPadding Default Value ​

The default value is:

json
50

rightPadding ​

分配给活动右侧部分名称的空间

rightPadding

rightPadding Type ​

integer

rightPadding Constraints ​

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

rightPadding Default Value ​

The default value is:

json
75

leftPadding ​

分配给活动左侧部分名称的空间

leftPadding

leftPadding Type ​

integer

leftPadding Constraints ​

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

leftPadding Default Value ​

The default value is:

json
75

gridLineStartPadding ​

网格线的垂直起始位置

gridLineStartPadding

gridLineStartPadding Type ​

integer

gridLineStartPadding Constraints ​

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

gridLineStartPadding Default Value ​

The default value is:

json
35

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
11

sectionFontSize ​

各部分的字体大小

sectionFontSize

  • is required

  • Type: integer

  • cannot be null

  • defined in: Mermaid Config

  • tsType: string | number

sectionFontSize Type ​

integer

sectionFontSize Constraints ​

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

sectionFontSize Default Value ​

The default value is:

json
11

numberSectionStyles ​

交替部分样式的数量

numberSectionStyles

numberSectionStyles Type ​

integer

numberSectionStyles Constraints ​

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

numberSectionStyles Default Value ​

The default value is:

json
4

axisFormat ​

轴的日期/时间格式这可能需要调整以匹配你的语言环境和首选项。

axisFormat

axisFormat Type ​

string

axisFormat Default Value ​

The default value is:

json
"%Y-%m-%d"

tickInterval ​

轴刻度

Pattern is:

javascript
/^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/;

tickInterval

tickInterval Type ​

string

tickInterval Constraints ​

pattern: the string must match the following regular expression:

javascript
/^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/

try pattern

topAxis ​

设置此标志后,日期标签将添加到图表顶部

topAxis

topAxis Type ​

boolean

topAxis Default Value ​

The default value is:

json
false

displayMode ​

控制显示模式。

displayMode

displayMode Type ​

string

displayMode Constraints ​

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

ValueExplanation
""
"compact"Enables displaying multiple tasks on the same row.

displayMode Default Value ​

The default value is:

json
""

weekday ​

基于一周的间隔应在哪一天开始

weekday

weekday Type ​

string

weekday Constraints ​

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

ValueExplanation
"monday"
"tuesday"
"wednesday"
"thursday"
"friday"
"saturday"
"sunday"

weekday Default Value ​

The default value is:

json
"sunday"

Definitions group SequenceDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/SequenceDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
hideUnusedParticipantsbooleanOptionalcannot be nullMermaid Config
activationWidthintegerRequiredcannot be nullMermaid Config
diagramMarginXintegerRequiredcannot be nullMermaid Config
diagramMarginYintegerRequiredcannot be nullMermaid Config
actorMarginintegerRequiredcannot be nullMermaid Config
widthintegerRequiredcannot be nullMermaid Config
heightintegerRequiredcannot be nullMermaid Config
boxMarginintegerRequiredcannot be nullMermaid Config
boxTextMarginintegerRequiredcannot be nullMermaid Config
noteMarginintegerRequiredcannot be nullMermaid Config
messageMarginintegerRequiredcannot be nullMermaid Config
messageAlignstringRequiredcannot be nullMermaid Config
mirrorActorsbooleanRequiredcannot be nullMermaid Config
forceMenusbooleanRequiredcannot be nullMermaid Config
bottomMarginAdjintegerRequiredcannot be nullMermaid Config
rightAnglesbooleanRequiredcannot be nullMermaid Config
showSequenceNumbersbooleanRequiredcannot be nullMermaid Config
actorFontSizeMultipleRequiredcannot be nullMermaid Config
actorFontFamilystringRequiredcannot be nullMermaid Config
actorFontWeightMultipleRequiredcannot be nullMermaid Config
noteFontSizeMultipleRequiredcannot be nullMermaid Config
noteFontFamilystringRequiredcannot be nullMermaid Config
noteFontWeightMultipleRequiredcannot be nullMermaid Config
noteAlignstringRequiredcannot be nullMermaid Config
messageFontSizeMultipleRequiredcannot be nullMermaid Config
messageFontFamilystringRequiredcannot be nullMermaid Config
messageFontWeightMultipleRequiredcannot be nullMermaid Config
wrapbooleanOptionalcannot be nullMermaid Config
wrapPaddingnumberOptionalcannot be nullMermaid Config
labelBoxWidthnumberOptionalcannot be nullMermaid Config
labelBoxHeightnumberOptionalcannot be nullMermaid Config
messageFontNot specifiedOptionalcannot be nullMermaid Config
noteFontNot specifiedOptionalcannot be nullMermaid Config
actorFontNot specifiedOptionalcannot 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"

arrowMarkerAbsolute ​

arrowMarkerAbsolute

arrowMarkerAbsolute Type ​

boolean

hideUnusedParticipants ​

hideUnusedParticipants

hideUnusedParticipants Type ​

boolean

hideUnusedParticipants Default Value ​

The default value is:

json
false

activationWidth ​

激活矩形的宽度

activationWidth

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

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

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

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

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

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

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

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

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

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

messageAlign Type ​

string

messageAlign Constraints ​

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

ValueExplanation
"left"
"center"
"right"

messageAlign Default Value ​

The default value is:

json
"center"

mirrorActors ​

镜像图表下方的参与者

mirrorActors

mirrorActors Type ​

boolean

mirrorActors Default Value ​

The default value is:

json
true

forceMenus ​

强制角色弹出菜单始终可见(以支持 E2E 测试)。

forceMenus

forceMenus Type ​

boolean

forceMenus Default Value ​

The default value is:

json
false

bottomMarginAdj ​

向下延长图表的边缘。根据 css 样式,这可能需要调整。

bottomMarginAdj

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

rightAngles Type ​

boolean

rightAngles Default Value ​

The default value is:

json
false

showSequenceNumbers ​

这将显示节点编号

showSequenceNumbers

showSequenceNumbers Type ​

boolean

showSequenceNumbers Default Value ​

The default value is:

json
false

actorFontSize ​

这设置了参与者描述的字体大小

actorFontSize

  • is required

  • Type: any of the following: string or number (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

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 or number (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 or number (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

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 or number (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

noteAlign Type ​

string

noteAlign Constraints ​

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

ValueExplanation
"left"
"center"
"right"

noteAlign Default Value ​

The default value is:

json
"center"

messageFontSize ​

这设置了参与者消息的字体大小

messageFontSize

  • is required

  • Type: any of the following: string or number (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

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 or number (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

wrap Type ​

boolean

wrap Default Value ​

The default value is:

json
false

wrapPadding ​

设置图表的自动换行填充(仅限侧面)

wrapPadding

wrapPadding Type ​

number

wrapPadding Default Value ​

The default value is:

json
10

labelBoxWidth ​

这设置了循环框的宽度(循环、alt、opt、par)

labelBoxWidth

labelBoxWidth Type ​

number

labelBoxWidth Default Value ​

The default value is:

json
50

labelBoxHeight ​

这设置了循环框的高度(循环、alt、opt、par)

labelBoxHeight

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

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

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

actorFont Type ​

unknown (Font Calculator)

Definitions group SwimlaneDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/SwimlaneDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
layoutstringOptionalcannot be nullMermaid Config
lineHopsMergedOptionalcannot be nullMermaid Config
ignoreCrossLaneEdgesbooleanOptionalcannot be nullMermaid Config
optimizeRanksByCrossingsbooleanOptionalcannot be nullMermaid Config
automaticLaneOrderingbooleanOptionalcannot 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"

layout ​

定义用于渲染图表的布局算法。

layout

layout Type ​

string

layout Default Value ​

The default value is:

json
"swimlane"

lineHops ​

将边缘交叉显示为小弧线 ("hops") 或可见间隙,以便更容易读取重叠的边缘。设置为 false 可禁用。为避免破坏几何形状,曲线渲染的边缘将被跳过。

lineHops

lineHops Type ​

merged type (Details)

one (and only one) of

lineHops Default Value ​

The default value is:

json
"arc"

ignoreCrossLaneEdges ​

在分配泳道层时忽略跨越泳道边界的边。这可以提高具有许多跨泳道链接的图表的排名质量。

ignoreCrossLaneEdges

ignoreCrossLaneEdges Type ​

boolean

ignoreCrossLaneEdges Default Value ​

The default value is:

json
true

optimizeRanksByCrossings ​

启用针对泳道布局的交叉感知排名优化处理。

optimizeRanksByCrossings

optimizeRanksByCrossings Type ​

boolean

optimizeRanksByCrossings Default Value ​

The default value is:

json
true

automaticLaneOrdering ​

使用确定性的加权线性排列启发式自动重新排序顶层泳道。默认情况下禁用,因为源泳道顺序可能具有语义意义。

automaticLaneOrdering

automaticLaneOrdering Type ​

boolean

automaticLaneOrdering Default Value ​

The default value is:

json
false

Definitions group AgentflowDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/AgentflowDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
titleTopMarginintegerOptionalcannot be nullMermaid Config
diagramPaddingintegerOptionalcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
wrappingWidthnumberOptionalcannot be nullMermaid Config
minNodeWidthnumberOptionalcannot 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
8

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

wrappingWidth ​

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

wrappingWidth

wrappingWidth Type ​

number

wrappingWidth Default Value ​

The default value is:

json
120

minNodeWidth ​

节点标签区域的最小宽度。比这个宽的标签会被加宽,所以短文本的节点也会有统一的宽度;节点自身的内边距会叠加上去,就像 wrappingWidth 的情况一样。设置了明确宽度的节点不受影响。

minNodeWidth

minNodeWidth Type ​

number

minNodeWidth Default Value ​

The default value is:

json
120

Definitions group FlowchartDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/FlowchartDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
titleTopMarginintegerRequiredcannot be nullMermaid Config
subGraphTitleMarginobjectRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
diagramPaddingintegerRequiredcannot be nullMermaid Config
htmlLabelsbooleanOptionalcan be nullMermaid Config
nodeSpacingintegerRequiredcannot be nullMermaid Config
rankSpacingintegerRequiredcannot be nullMermaid Config
curvestringRequiredcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
wrappingWidthnumberRequiredcannot be nullMermaid Config
minNodeWidthnumberRequiredcannot be nullMermaid Config
inheritDirbooleanOptionalcannot 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

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 ​

DEPRECATED: Use global htmlLabels instead.

Flag for setting whether or not a html tag should be used for rendering labels on nodes and edges. This property is deprecated. Please use the global htmlLabels configuration instead.

htmlLabels

htmlLabels Type ​

boolean

htmlLabels Default Value ​

The default value is:

json
null

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"
"bumpX"
"bumpY"
"cardinal"
"catmullRom"
"linear"
"monotoneX"
"monotoneY"
"natural"
"step"
"stepAfter"
"stepBefore"
"rounded"

curve Default Value ​

The default value is:

json
"basis"

padding ​

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

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
15

wrappingWidth ​

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

wrappingWidth

wrappingWidth Type ​

number

wrappingWidth Default Value ​

The default value is:

json
120

minNodeWidth ​

节点标签区域的最小宽度。比这个宽的标签会被加宽,所以短文本的节点也会有统一的宽度;节点自身的内边距会叠加上去,就像 wrappingWidth 的情况一样。设置了明确宽度的节点不受影响。

minNodeWidth

minNodeWidth Type ​

number

minNodeWidth Default Value ​

The default value is:

json
120

inheritDir ​

如果设置为 true,则没有明确方向的子图将继承全局图方向(例如 LR、TB、RL、BT)。默认为 false,以保留旧版布局行为。

inheritDir

inheritDir Type ​

boolean

inheritDir Default Value ​

The default value is:

json
false

Definitions group SankeyLinkColor ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/SankeyLinkColor" }
PropertyTypeRequiredNullableDefined by

Definitions group SankeyLabelStyle ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/SankeyLabelStyle" }
PropertyTypeRequiredNullableDefined by

Definitions group SankeyNodeAlignment ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/SankeyNodeAlignment" }
PropertyTypeRequiredNullableDefined by

Definitions group SankeyDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/SankeyDiagramConfig" }
PropertyTypeRequiredNullableDefined by
widthnumberOptionalcannot be nullMermaid Config
heightnumberOptionalcannot be nullMermaid Config
linkColorMergedOptionalcannot be nullMermaid Config
nodeAlignmentstringOptionalcannot be nullMermaid Config
useMaxWidthbooleanOptionalcannot be nullMermaid Config
showValuesbooleanOptionalcannot be nullMermaid Config
prefixstringOptionalcannot be nullMermaid Config
suffixstringOptionalcannot be nullMermaid Config
nodeWidthnumberOptionalcannot be nullMermaid Config
nodePaddingnumberOptionalcannot be nullMermaid Config
labelStylestringOptionalcannot be nullMermaid Config
nodeColorsobjectOptionalcannot be nullMermaid Config

width ​

width

width Type ​

number

width Default Value ​

The default value is:

json
600

height ​

height

height Type ​

number

height Default Value ​

The default value is:

json
400

linkColor ​

桑基图中链接的颜色。

linkColor

linkColor Type ​

merged type (Details)

any of

linkColor Default Value ​

The default value is:

json
"gradient"

nodeAlignment ​

控制桑基图的对齐方式。

See https://github.com/d3/d3-sankey#alignments.

nodeAlignment

nodeAlignment Type ​

string

nodeAlignment Constraints ​

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

ValueExplanation
"left"Align all inputs to the left.
"right"Align all outputs to the right.
"center"Like `left`, except that nodes without any incoming links are moved as right as possible.
"justify"Like `left`, except that nodes without any outgoing links are moved to the far right.

nodeAlignment Default Value ​

The default value is:

json
"justify"

useMaxWidth ​

useMaxWidth

useMaxWidth Type ​

boolean

useMaxWidth Default Value ​

The default value is:

json
false

showValues ​

切换以显示或隐藏值以及标题。

showValues

showValues Type ​

boolean

showValues Default Value ​

The default value is:

json
true

prefix ​

用于值的前缀

prefix

prefix Type ​

string

prefix Default Value ​

The default value is:

json
""

suffix ​

用于值的后缀

suffix

suffix Type ​

string

suffix Default Value ​

The default value is:

json
""

nodeWidth ​

桑基图中节点的宽度。

nodeWidth

nodeWidth Type ​

number

nodeWidth Default Value ​

The default value is:

json
10

nodePadding ​

桑基图中节点之间的填充间距。

nodePadding

nodePadding Type ​

number

nodePadding Default Value ​

The default value is:

json
12

labelStyle ​

桑基图中标签的样式。

labelStyle

labelStyle Type ​

string

labelStyle Constraints ​

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

ValueExplanation
"legacy"Plain text labels (original style).
"outlined"Labels with a white outline for better readability against colored backgrounds.

labelStyle Default Value ​

The default value is:

json
"legacy"

nodeColors ​

节点 ID 到其颜色的映射。未指定的节点将使用默认配色方案。

nodeColors

nodeColors Type ​

object (Details)

Definitions group PacketDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/PacketDiagramConfig" }
PropertyTypeRequiredNullableDefined by
rowHeightnumberOptionalcannot be nullMermaid Config
bitWidthnumberOptionalcannot be nullMermaid Config
bitsPerRownumberOptionalcannot be nullMermaid Config
showBitsbooleanOptionalcannot be nullMermaid Config
bitOrderstringOptionalcannot be nullMermaid Config
paddingXnumberOptionalcannot be nullMermaid Config
paddingYnumberOptionalcannot be nullMermaid Config

rowHeight ​

数据包图中每行的高度。

rowHeight

rowHeight Type ​

number

rowHeight Constraints ​

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

rowHeight Default Value ​

The default value is:

json
32

bitWidth ​

数据包图中每个位的宽度。

bitWidth

bitWidth Type ​

number

bitWidth Constraints ​

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

bitWidth Default Value ​

The default value is:

json
32

bitsPerRow ​

每行显示的位数。

bitsPerRow

bitsPerRow Type ​

number

bitsPerRow Constraints ​

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

bitsPerRow Default Value ​

The default value is:

json
32

showBits ​

切换以显示或隐藏位编号。

showBits

showBits Type ​

boolean

showBits Default Value ​

The default value is:

json
true

bitOrder ​

每一行编号的方向。descending 会镜像每一行,所以从该行的最高位在左到最低位在右阅读,这是硬件寄存器使用的惯例。字段仍然是从最低位开始声明,并保持它们的宽度。

bitOrder

bitOrder Type ​

string

bitOrder Constraints ​

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

ValueExplanation
"ascending"Number each row from its lowest bit on the left up to its highest bit on the right.
"descending"Number each row from its highest bit on the left down to its lowest bit on the right.

bitOrder Default Value ​

The default value is:

json
"ascending"

paddingX ​

一行中块之间的水平填充。

paddingX

paddingX Type ​

number

paddingX Constraints ​

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

paddingX Default Value ​

The default value is:

json
5

paddingY ​

行之间的垂直填充。

paddingY

paddingY Type ​

number

paddingY Constraints ​

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

paddingY Default Value ​

The default value is:

json
5

Definitions group BlockDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/BlockDiagramConfig" }
PropertyTypeRequiredNullableDefined by
paddingnumberOptionalcannot be nullMermaid Config

padding ​

padding

padding Type ​

number

padding Constraints ​

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

padding Default Value ​

The default value is:

json
8

Definitions group EventModelingDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/EventModelingDiagramConfig" }
PropertyTypeRequiredNullableDefined by
paddingnumberOptionalcannot be nullMermaid Config
rowHeightnumberOptionalcannot be nullMermaid Config

padding ​

事件建模图周围的填充。

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
30

rowHeight ​

事件建模图中每一行的高度。

rowHeight

rowHeight Type ​

number

rowHeight Constraints ​

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

rowHeight Default Value ​

The default value is:

json
32

Definitions group TreeViewDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/TreeViewDiagramConfig" }
PropertyTypeRequiredNullableDefined by
rowIndentnumberOptionalcannot be nullMermaid Config
paddingXnumberOptionalcannot be nullMermaid Config
paddingYnumberOptionalcannot be nullMermaid Config
lineThicknessnumberOptionalcannot be nullMermaid Config
showIconsbooleanOptionalcannot be nullMermaid Config
defaultIconPackstringOptionalcannot be nullMermaid Config
filenameIconsobjectOptionalcannot be nullMermaid Config
extensionIconsobjectOptionalcannot be nullMermaid Config

rowIndent ​

相差一级的行间水平距离

rowIndent

rowIndent Type ​

number

rowIndent Constraints ​

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

rowIndent Default Value ​

The default value is:

json
10

paddingX ​

标签的水平内边距

paddingX

paddingX Type ​

number

paddingX Constraints ​

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

paddingX Default Value ​

The default value is:

json
5

paddingY ​

标签的垂直内边距

paddingY

paddingY Type ​

number

paddingY Constraints ​

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

paddingY Default Value ​

The default value is:

json
5

lineThickness ​

线条的厚度

lineThickness

lineThickness Type ​

number

lineThickness Constraints ​

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

lineThickness Default Value ​

The default value is:

json
1

showIcons ​

是否在标签旁显示默认的文件/文件夹图标。明确的 icon() 注释始终会渲染,无论此设置如何。

showIcons

showIcons Type ​

boolean

showIcons Default Value ​

The default value is:

json
false

defaultIconPack ​

用于解析未加前缀图标引用的已注册 Iconify 包名称 — icon(name) 注释和 filenameIcons/ extensionIcons values without a pack: prefix. The pack must be registered with registerIconPacks. When empty, unprefixed names resolve to the built-in file/folder icons.

defaultIconPack

defaultIconPack Type ​

string

defaultIconPack Default Value ​

The default value is:

json
""

filenameIcons ​

精确文件名 → 图标映射,用于在启用 showIcons 时选择文件的图标,例如。 { "Dockerfile": "material-icon-theme:docker" }. Values are resolved like icon() references: pack:name is used as-is, unprefixed names resolve via defaultIconPack, and none hides the icon for matching files.

filenameIcons

filenameIcons Type ​

object (Details)

filenameIcons Default Value ​

The default value is:

json
{}

extensionIcons ​

文件扩展名 → 图标映射,用于在启用 showIcons 时选择文件的图标,例如 { ".ts": "material-icon-theme:typescript" }. Keys are lowercase and may include or omit the leading dot. Values are resolved like icon() references: pack:name is used as-is, unprefixed names resolve via defaultIconPack, and none hides the icon for matching files.

extensionIcons

extensionIcons Type ​

object (Details)

extensionIcons Default Value ​

The default value is:

json
{}

Definitions group RadarDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/RadarDiagramConfig" }
PropertyTypeRequiredNullableDefined by
widthnumberOptionalcannot be nullMermaid Config
heightnumberOptionalcannot be nullMermaid Config
marginTopnumberOptionalcannot be nullMermaid Config
marginRightnumberOptionalcannot be nullMermaid Config
marginBottomnumberOptionalcannot be nullMermaid Config
marginLeftnumberOptionalcannot be nullMermaid Config
axisScaleFactornumberOptionalcannot be nullMermaid Config
axisLabelFactornumberOptionalcannot be nullMermaid Config
curveTensionnumberOptionalcannot be nullMermaid Config

width ​

雷达图的大小。

width

width Type ​

number

width Constraints ​

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

width Default Value ​

The default value is:

json
600

height ​

雷达图的大小。

height

height Type ​

number

height Constraints ​

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

height Default Value ​

The default value is:

json
600

marginTop ​

雷达图顶部的边距。

marginTop

marginTop Type ​

number

marginTop Constraints ​

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

marginTop Default Value ​

The default value is:

json
50

marginRight ​

雷达图右侧的边距。

marginRight

marginRight Type ​

number

marginRight Constraints ​

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

marginRight Default Value ​

The default value is:

json
50

marginBottom ​

雷达图底部的边距。

marginBottom

marginBottom Type ​

number

marginBottom Constraints ​

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

marginBottom Default Value ​

The default value is:

json
50

marginLeft ​

雷达图左侧的边距。

marginLeft

marginLeft Type ​

number

marginLeft Constraints ​

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

marginLeft Default Value ​

The default value is:

json
50

axisScaleFactor ​

轴的比例因子。

axisScaleFactor

axisScaleFactor Type ​

number

axisScaleFactor Constraints ​

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

axisScaleFactor Default Value ​

The default value is:

json
1

axisLabelFactor ​

轴标签的比例因子。

axisLabelFactor

axisLabelFactor Type ​

number

axisLabelFactor Constraints ​

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

axisLabelFactor Default Value ​

The default value is:

json
1.05

curveTension ​

Catmull-Rom 样条转换为三次贝塞尔曲线的张力因子。

curveTension

curveTension Type ​

number

curveTension Constraints ​

maximum: the value of this number must smaller than or equal to: 1

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

curveTension Default Value ​

The default value is:

json
0.17

Definitions group UsecaseDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/UsecaseDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
wrappingWidthnumberRequiredcannot be nullMermaid Config
minNodeWidthnumberRequiredcannot be nullMermaid Config
actorFontSizenumberOptionalcannot be nullMermaid Config
actorFontFamilystringOptionalcannot be nullMermaid Config
actorFontWeightstringOptionalcannot be nullMermaid Config
usecaseFontSizenumberOptionalcannot be nullMermaid Config
usecaseFontFamilystringOptionalcannot be nullMermaid Config
usecaseFontWeightstringOptionalcannot be nullMermaid Config
nodeSpacingnumberOptionalcannot be nullMermaid Config
rankSpacingnumberOptionalcannot be nullMermaid Config
diagramPaddingnumberOptionalcannot be nullMermaid Config
colorSchemestringOptionalcannot 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"

wrappingWidth ​

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

wrappingWidth

wrappingWidth Type ​

number

wrappingWidth Default Value ​

The default value is:

json
120

minNodeWidth ​

节点标签区域的最小宽度。比这个宽的标签会被加宽,所以短文本的节点也会有统一的宽度;节点自身的内边距会叠加上去,就像 wrappingWidth 的情况一样。设置了明确宽度的节点不受影响。

minNodeWidth

minNodeWidth Type ​

number

minNodeWidth Default Value ​

The default value is:

json
120

actorFontSize ​

角色标签的字体大小

actorFontSize

actorFontSize Type ​

number

actorFontSize Constraints ​

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

actorFontSize Default Value ​

The default value is:

json
14

actorFontFamily ​

演员标签的字体系列。逐字写入到内联 CSS 自定义属性中,因此可能出现的字符 terminate a declaration or open a new one are excluded: ;, <, >, (, ), {, }, and \. Quotes, commas, and spaces stay allowed for font stacks such as "Open Sans", sans-serif.

actorFontFamily

actorFontFamily Type ​

string

actorFontFamily Constraints ​

pattern: the string must match the following regular expression:

javascript
/^[^;<>(){}\\]*$/

try pattern

actorFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

actorFontWeight ​

演员标签的字体粗细。仅限于 CSS 的 font-weight 关键字和数值粗细,因为这个值会直接写入内联 CSS 自定义属性。

actorFontWeight

actorFontWeight Type ​

string

actorFontWeight Constraints ​

pattern: the string must match the following regular expression:

javascript
/^(normal|bold|bolder|lighter|inherit|initial|revert|unset|[1-9][0-9]{0,3})$/

try pattern

actorFontWeight Default Value ​

The default value is:

json
"normal"

usecaseFontSize ​

用例标签的字体大小

usecaseFontSize

usecaseFontSize Type ​

number

usecaseFontSize Constraints ​

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

usecaseFontSize Default Value ​

The default value is:

json
12

usecaseFontFamily ​

用于用例标签的字体系列。约束方式与 actorFontFamily 相同。

usecaseFontFamily

usecaseFontFamily Type ​

string

usecaseFontFamily Constraints ​

pattern: the string must match the following regular expression:

javascript
/^[^;<>(){}\\]*$/

try pattern

usecaseFontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

usecaseFontWeight ​

用例标签的字体粗细。约束方式与 actorFontWeight 相同。

usecaseFontWeight

usecaseFontWeight Type ​

string

usecaseFontWeight Constraints ​

pattern: the string must match the following regular expression:

javascript
/^(normal|bold|bolder|lighter|inherit|initial|revert|unset|[1-9][0-9]{0,3})$/

try pattern

usecaseFontWeight Default Value ​

The default value is:

json
"normal"

nodeSpacing ​

同一级别节点之间的间距

nodeSpacing

nodeSpacing Type ​

number

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 ​

不同层节点之间的间距

rankSpacing

rankSpacing Type ​

number

rankSpacing Constraints ​

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

rankSpacing Default Value ​

The default value is:

json
50

diagramPadding ​

整个图表周围的内边距

diagramPadding

diagramPadding Type ​

number

diagramPadding Constraints ​

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

diagramPadding Default Value ​

The default value is:

json
20

colorScheme ​

用例图的颜色如何从活动主题中获取。role(默认)会给每种元素分配一种颜色,这些颜色取自 usecaseActorBkg / usecaseActorBorder、usecaseBkg / usecaseBorder 和 usecaseBoundaryBkg / usecaseBoundaryBorder 主题变量。颜色表示元素的“类型”,在插入、重新排序和重命名时保持不变——在中间添加一个用例不会重新着色后面的元素,因此差异对比、文档截图和视觉基线都保持稳定。而 rotate 则会给每个角色、用例和系统边界分配主题类别调色板(borderColorArray / bkgColorArray)中的独立槽,就像 ER 实体和类框的着色方式一样。角色和用例共享一个循环,而系统边界从零开始运行第二个循环,因此边界不会被迫与其中的元素匹配。在共享循环中,角色优先编号,用例紧随其后,按声明顺序排列——因此交错的 actor A、usecase U、actor B 的编号是 A、B、U,而不是 A, U, B. This buys per-instance variety at the cost of the stability role has: inserting an element shifts the colour of every later element of its own kind, and inserting an actor shifts the use cases too. Only the colour themes (redux-color, redux-dark-color) carry a palette, so on every other theme the two settings render identically.

classDef and style keep overriding both, whichever is set.

colorScheme

colorScheme Type ​

string

colorScheme Constraints ​

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

ValueExplanation
"role"
"rotate"

colorScheme Default Value ​

The default value is:

json
"role"

Definitions group VennDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/VennDiagramConfig" }
PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
widthnumberOptionalcannot be nullMermaid Config
heightnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
useDebugLayoutbooleanOptionalcannot 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"

width ​

维恩图的宽度。

width

width Type ​

number

width Constraints ​

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

width Default Value ​

The default value is:

json
800

height ​

维恩图的高度。

height

height Type ​

number

height Constraints ​

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

height Default Value ​

The default value is:

json
450

padding ​

padding

padding Type ​

number

padding Constraints ​

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

padding Default Value ​

The default value is:

json
8

useDebugLayout ​

useDebugLayout

useDebugLayout Type ​

boolean

useDebugLayout Default Value ​

The default value is:

json
false

Definitions group WardleyDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/WardleyDiagramConfig" }
PropertyTypeRequiredNullableDefined by
widthnumberRequiredcannot be nullMermaid Config
heightnumberRequiredcannot be nullMermaid Config
paddingnumberRequiredcannot be nullMermaid Config
nodeRadiusnumberRequiredcannot be nullMermaid Config
nodeLabelOffsetnumberOptionalcannot be nullMermaid Config
axisFontSizenumberRequiredcannot be nullMermaid Config
labelFontSizenumberRequiredcannot be nullMermaid Config
showGridbooleanOptionalcannot be nullMermaid Config

width ​

沃德利图画布的宽度。

width

width Type ​

number

width Constraints ​

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

width Default Value ​

The default value is:

json
900

height ​

沃德利图画布的高度。

height

height Type ​

number

height Constraints ​

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

height Default Value ​

The default value is:

json
600

padding ​

Wardley 图周围的边距。

padding

padding Type ​

number

padding Constraints ​

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

padding Default Value ​

The default value is:

json
48

nodeRadius ​

组件节点的半径。

nodeRadius

nodeRadius Type ​

number

nodeRadius Constraints ​

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

nodeRadius Default Value ​

The default value is:

json
6

nodeLabelOffset ​

节点标签的偏移距离。

nodeLabelOffset

nodeLabelOffset Type ​

number

nodeLabelOffset Constraints ​

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

nodeLabelOffset Default Value ​

The default value is:

json
8

axisFontSize ​

坐标轴标签的字体大小。

axisFontSize

axisFontSize Type ​

number

axisFontSize Constraints ​

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

axisFontSize Default Value ​

The default value is:

json
12

labelFontSize ​

组件标签的字体大小。

labelFontSize

labelFontSize Type ​

number

labelFontSize Constraints ​

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

labelFontSize Default Value ​

The default value is:

json
10

showGrid ​

是否显示背景网格。

showGrid

showGrid Type ​

boolean

showGrid Default Value ​

The default value is:

json
false

Definitions group CynefinDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/CynefinDiagramConfig" }
PropertyTypeRequiredNullableDefined by
widthnumberOptionalcannot be nullMermaid Config
heightnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
showDomainDescriptionsbooleanOptionalcannot be nullMermaid Config
boundaryAmplitudenumberOptionalcannot be nullMermaid Config
seednumberOptionalcannot be nullMermaid Config

width ​

Cynefin 图的宽度。

width

width Type ​

number

width Constraints ​

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

width Default Value ​

The default value is:

json
800

height ​

Cynefin 图的高度。

height

height Type ​

number

height Constraints ​

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

height Default Value ​

The default value is:

json
600

padding ​

图表周围的填充。

padding

padding Type ​

number

padding Constraints ​

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

padding Default Value ​

The default value is:

json
40

showDomainDescriptions ​

显示决策模型和实践类型标签。

showDomainDescriptions

showDomainDescriptions Type ​

boolean

showDomainDescriptions Default Value ​

The default value is:

json
true

boundaryAmplitude ​

晶域边界的波动幅度(直线为0)。

boundaryAmplitude

boundaryAmplitude Type ​

number

boundaryAmplitude Constraints ​

maximum: the value of this number must smaller than or equal to: 50

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

boundaryAmplitude Default Value ​

The default value is:

json
8

seed ​

用于边界波纹的确定性种子。为 0 时(默认值),种子由图表的 SVG 元素 ID 派生,该 ID 在每次渲染时会变化。设置任意非零数字可在每次渲染时生成相同的边界——这是保持视觉回归测试稳定所必需的。

seed

seed Type ​

number

seed Default Value ​

The default value is:

json
0

Definitions group RailroadDiagramConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/RailroadDiagramConfig" }
PropertyTypeRequiredNullableDefined by
compactModebooleanOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
verticalSeparationnumberOptionalcannot be nullMermaid Config
horizontalSeparationnumberOptionalcannot be nullMermaid Config
arcRadiusnumberOptionalcannot be nullMermaid Config
fontSizenumberOptionalcannot be nullMermaid Config
fontFamilystringOptionalcannot be nullMermaid Config
terminalFillstringOptionalcannot be nullMermaid Config
terminalStrokestringOptionalcannot be nullMermaid Config
terminalTextColorstringOptionalcannot be nullMermaid Config
nonTerminalFillstringOptionalcannot be nullMermaid Config
nonTerminalStrokestringOptionalcannot be nullMermaid Config
nonTerminalTextColorstringOptionalcannot be nullMermaid Config
lineColorstringOptionalcannot be nullMermaid Config
strokeWidthnumberOptionalcannot be nullMermaid Config
markerFillstringOptionalcannot be nullMermaid Config
commentFillstringOptionalcannot be nullMermaid Config
commentStrokestringOptionalcannot be nullMermaid Config
commentTextColorstringOptionalcannot be nullMermaid Config
specialFillstringOptionalcannot be nullMermaid Config
specialStrokestringOptionalcannot be nullMermaid Config
ruleNameColorstringOptionalcannot be nullMermaid Config
showMarkersbooleanOptionalcannot be nullMermaid Config
markerRadiusnumberOptionalcannot be nullMermaid Config

compactMode ​

使用紧凑布局模式

compactMode

compactMode Type ​

boolean

compactMode Default Value ​

The default value is:

json
false

padding ​

元素周围的内边距

padding

padding Type ​

number

padding Constraints ​

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

padding Default Value ​

The default value is:

json
10

verticalSeparation ​

元素之间的垂直间距

verticalSeparation

verticalSeparation Type ​

number

verticalSeparation Constraints ​

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

verticalSeparation Default Value ​

The default value is:

json
8

horizontalSeparation ​

元素之间的水平间距

horizontalSeparation

horizontalSeparation Type ​

number

horizontalSeparation Constraints ​

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

horizontalSeparation Default Value ​

The default value is:

json
10

arcRadius ​

曲线路径的半径

arcRadius

arcRadius Type ​

number

arcRadius Constraints ​

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

arcRadius Default Value ​

The default value is:

json
10

fontSize ​

文本字体大小

fontSize

fontSize Type ​

number

fontSize Constraints ​

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

fontSize Default Value ​

The default value is:

json
14

fontFamily ​

文本的字体系列

fontFamily

fontFamily Type ​

string

fontFamily Default Value ​

The default value is:

json
"monospace"

terminalFill ​

终端元素的填充颜色

terminalFill

terminalFill Type ​

string

terminalFill Default Value ​

The default value is:

json
"#FFFFC0"

terminalStroke ​

终端元素的描边颜色

terminalStroke

terminalStroke Type ​

string

terminalStroke Default Value ​

The default value is:

json
"#000000"

terminalTextColor ​

终端元素的文本颜色

terminalTextColor

terminalTextColor Type ​

string

terminalTextColor Default Value ​

The default value is:

json
"#000000"

nonTerminalFill ​

非终端元素的填充颜色

nonTerminalFill

nonTerminalFill Type ​

string

nonTerminalFill Default Value ​

The default value is:

json
"#FFFFFF"

nonTerminalStroke ​

非终端元素的描边颜色

nonTerminalStroke

nonTerminalStroke Type ​

string

nonTerminalStroke Default Value ​

The default value is:

json
"#000000"

nonTerminalTextColor ​

非终端元素的文本颜色

nonTerminalTextColor

nonTerminalTextColor Type ​

string

nonTerminalTextColor Default Value ​

The default value is:

json
"#000000"

lineColor ​

连接线的颜色

lineColor

lineColor Type ​

string

lineColor Default Value ​

The default value is:

json
"#000000"

strokeWidth ​

笔画宽度

strokeWidth

strokeWidth Type ​

number

strokeWidth Constraints ​

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

strokeWidth Default Value ​

The default value is:

json
2

markerFill ​

起始/结束标记的填充颜色

markerFill

markerFill Type ​

string

markerFill Default Value ​

The default value is:

json
"#000000"

commentFill ​

评论填充颜色

commentFill

commentFill Type ​

string

commentFill Default Value ​

The default value is:

json
"#E8E8E8"

commentStroke ​

评论的描边颜色

commentStroke

commentStroke Type ​

string

commentStroke Default Value ​

The default value is:

json
"#888888"

commentTextColor ​

评论的文字颜色

commentTextColor

commentTextColor Type ​

string

commentTextColor Default Value ​

The default value is:

json
"#666666"

specialFill ​

特殊序列的填充颜色

specialFill

specialFill Type ​

string

specialFill Default Value ​

The default value is:

json
"#F0E0FF"

specialStroke ​

特殊序列的描边颜色

specialStroke

specialStroke Type ​

string

specialStroke Default Value ​

The default value is:

json
"#8800CC"

ruleNameColor ​

规则名称的颜色

ruleNameColor

ruleNameColor Type ​

string

ruleNameColor Default Value ​

The default value is:

json
"#000066"

showMarkers ​

显示开始/结束标记

showMarkers

showMarkers Type ​

boolean

showMarkers Default Value ​

The default value is:

json
true

markerRadius ​

起始/结束标记的半径

markerRadius

markerRadius Type ​

number

markerRadius Constraints ​

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

markerRadius Default Value ​

The default value is:

json
5

Definitions group FontCalculator ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/FontCalculator" }
PropertyTypeRequiredNullableDefined by

Definitions group FontConfig ​

Reference this group by using

json
{ "$ref": "https://mermaid.js.org/schemas/config.schema.json#/$defs/FontConfig" }
PropertyTypeRequiredNullableDefined by
fontSizeMultipleOptionalcannot be nullMermaid Config
fontFamilystringOptionalcannot be nullMermaid Config
fontWeightMultipleOptionalcannot be nullMermaid Config

fontSize ​

要使用的字体大小

fontSize

fontSize Type ​

any of the following: string or number (CSS Font Size)

fontSize Default Value ​

The default value is:

json
14

fontFamily ​

The CSS font-family to use.

fontFamily

fontFamily Type ​

string

fontFamily Default Value ​

The default value is:

json
"\"Open Sans\", sans-serif"

fontWeight ​

要使用的字体粗细。

fontWeight

  • is optional

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

fontWeight Type ​

any of the following: string or number (Details)

fontWeight Default Value ​

The default value is:

json
"normal"
Opens in mermaid.ai