Skip to content

Journey Diagram Config Schema ​

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

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

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

JourneyDiagramConfig Type ​

object (Journey Diagram Config)

all of

JourneyDiagramConfig Properties ​

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