Skip to content

Agentflow Diagram Config Schema ​

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

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

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

AgentflowDiagramConfig Type ​

object (Agentflow Diagram Config)

all of

AgentflowDiagramConfig Properties ​

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
Opens in mermaid.ai