主题
Untitled object in Mermaid Config Schema
txt
https://mermaid.js.org/schemas/config.schema.json#/properties/elk| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|---|---|---|---|---|---|---|---|
| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | config.schema.json* |
elk Type
object (Details)
elk Properties
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| mergeEdges | boolean | Optional | cannot be null | Mermaid Config |
| nodePlacementStrategy | string | Optional | cannot be null | Mermaid Config |
| nodePlacementAlignment | string | Optional | cannot be null | Mermaid Config |
| cycleBreakingStrategy | string | Optional | cannot be null | Mermaid Config |
| forceNodeModelOrder | boolean | Optional | cannot be null | Mermaid Config |
| considerModelOrder | string | Optional | cannot be null | Mermaid Config |
| keepEntryNodeOnTop | boolean | Optional | cannot be null | Mermaid Config |
mergeEdges
Elk 特定选项允许边在方便的地方共享路径。它可以制作漂亮的图表,但也会使图表更难阅读。
mergeEdges
is optional
Type:
booleancannot be null
defined in: Mermaid Config
mergeEdges Type
boolean
mergeEdges Default Value
The default value is:
json
falsenodePlacementStrategy
Elk 特定选项影响节点的放置方式。
nodePlacementStrategy
is optional
Type:
stringcannot be null
defined in: Mermaid Config
nodePlacementStrategy Type
string
nodePlacementStrategy Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"SIMPLE" | |
"NETWORK_SIMPLEX" | |
"LINEAR_SEGMENTS" | |
"BRANDES_KOEPF" |
nodePlacementStrategy Default Value
The default value is:
json
"BRANDES_KOEPF"nodePlacementAlignment
影响 Brandes-Koepf 节点放置对齐的 Elk 特定选项。NONE 选择高度最小的对齐方式。
nodePlacementAlignment
is optional
Type:
stringcannot be null
defined in: Mermaid Config
nodePlacementAlignment Type
string
nodePlacementAlignment Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"NONE" | |
"LEFTUP" | |
"LEFTDOWN" | |
"RIGHTUP" | |
"RIGHTDOWN" | |
"BALANCED" |
nodePlacementAlignment Default Value
The default value is:
json
"NONE"cycleBreakingStrategy
此策略决定如何在图中查找循环并决定哪些边需要调整以打破循环。
cycleBreakingStrategy
is optional
Type:
stringcannot be null
defined in: Mermaid Config
cycleBreakingStrategy Type
string
cycleBreakingStrategy Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"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
is optional
Type:
booleancannot be null
defined in: Mermaid Config
forceNodeModelOrder Type
boolean
forceNodeModelOrder Default Value
The default value is:
json
falseconsiderModelOrder
如果这不会导致额外的边交叉,则保留模型文件中节点和边的顺序。根据策略的不同,这并不总是可行的,因为节点和边的顺序可能存在冲突。
considerModelOrder
is optional
Type:
stringcannot be null
defined in: Mermaid Config
considerModelOrder Type
string
considerModelOrder Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"NONE" | |
"NODES_AND_EDGES" | |
"PREFER_EDGES" | |
"PREFER_NODES" |
considerModelOrder Default Value
The default value is:
json
"NODES_AND_EDGES"keepEntryNodeOnTop
每个特定选项都会将递归流程的入口节点保持在布局的顶部。当流程自身回环(回边到一个早期节点)时,ELK的基于度的循环断开算法没有"entry point"的概念,可能会将第一次声明的节点排列在中间,从而打乱阅读顺序。启用后,每个循环组件的入口节点都会固定在第一层,这样图表仍然可以从入口点阅读。非循环流程总是有一个自然的源,因此这对它们没有影响。
Only applies when the cyclic flow has no node without incoming edges: if the loop is fed from outside (e.g. a start node pointing into it), that component already has a natural source and nothing is pinned. Detection is also scoped per container, so cycles that cross a subgraph boundary are not detected.
keepEntryNodeOnTop
is optional
Type:
booleancannot be null
defined in: Mermaid Config
keepEntryNodeOnTop Type
boolean
keepEntryNodeOnTop Default Value
The default value is:
json
false