Skip to content

Class Diagram Config Schema

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/ClassDiagramConfig
AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

ClassDiagramConfig Type

object (Class Diagram Config)

all of

ClassDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
titleTopMarginintegerRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
dividerMarginnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
textHeightnumberOptionalcannot be nullMermaid Config
defaultRendererstringRequiredcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
diagramPaddingintegerOptionalcannot be nullMermaid Config
htmlLabelsbooleanOptionalcannot be nullMermaid Config
hideEmptyMembersBoxbooleanOptionalcannot 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

arrowMarkerAbsolute

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

arrowMarkerAbsolute

arrowMarkerAbsolute Type

boolean

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

defaultRenderer

决定要使用哪个渲染引擎进行渲染。

defaultRenderer

defaultRenderer Type

string

defaultRenderer Constraints

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

ValueExplanation
"dagre-d3"The [dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es) library.
"dagre-wrapper"wrapper for dagre implemented in mermaid
"elk"Layout using [elkjs](https://github.com/kieler/elkjs)

defaultRenderer Default Value

The default value is:

json
"dagre-wrapper"

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

hideEmptyMembersBox

hideEmptyMembersBox

hideEmptyMembersBox Type

boolean