Skip to content

Untitled object in Mermaid Config Schema

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

elk Type

object (Details)

elk Properties

PropertyTypeRequiredNullableDefined by
mergeEdgesbooleanOptionalcannot be nullMermaid Config
nodePlacementStrategystringOptionalcannot be nullMermaid Config
cycleBreakingStrategystringOptionalcannot be nullMermaid Config
forceNodeModelOrderbooleanOptionalcannot be nullMermaid Config
considerModelOrderstringOptionalcannot be nullMermaid Config

mergeEdges

Elk 特定选项允许边在方便的地方共享路径。它可以制作漂亮的图表,但也会使图表更难阅读。

mergeEdges

mergeEdges Type

boolean

nodePlacementStrategy

Elk 特定选项影响节点的放置方式。

nodePlacementStrategy

nodePlacementStrategy Type

string

nodePlacementStrategy Constraints

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

ValueExplanation
"SIMPLE"
"NETWORK_SIMPLEX"
"LINEAR_SEGMENTS"
"BRANDES_KOEPF"

nodePlacementStrategy Default Value

The default value is:

json
"BRANDES_KOEPF"

cycleBreakingStrategy

此策略决定如何在图中查找循环并决定哪些边需要调整以打破循环。

cycleBreakingStrategy

cycleBreakingStrategy Type

string

cycleBreakingStrategy Constraints

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

ValueExplanation
"GREEDY"
"DEPTH_FIRST"
"INTERACTIVE"
"MODEL_ORDER"
"GREEDY_MODEL_ORDER"

cycleBreakingStrategy Default Value

The default value is:

json
"GREEDY_MODEL_ORDER"

forceNodeModelOrder

模型给定的节点顺序不会为了产生更好的布局而改变。例如,如果模型中的节点 A 位于节点 B 之前,则在交叉最小化过程中不会改变该顺序。这假设在交叉最小化之前已经遵循了节点模型顺序。这可以通过将 considerModelOrder.strategy 设置为 NODES_AND_EDGES 来实现。

forceNodeModelOrder

forceNodeModelOrder Type

boolean

considerModelOrder

如果这不会导致额外的边交叉,则保留模型文件中节点和边的顺序。根据策略的不同,这并不总是可行的,因为节点和边的顺序可能存在冲突。

considerModelOrder

considerModelOrder Type

string

considerModelOrder Constraints

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

ValueExplanation
"NONE"
"NODES_AND_EDGES"
"PREFER_EDGES"
"PREFER_NODES"

considerModelOrder Default Value

The default value is:

json
"NODES_AND_EDGES"
Opens in MermaidChart.com