Untitled object in Mermaid Config Schema
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 specific option that allows edges to share path where it convenient. It can make for pretty diagrams but can also make it harder to read the diagram.
mergeEdges
is optional
Type:
booleancannot be null
defined in: Mermaid Config
mergeEdges Type
boolean
mergeEdges Default Value
The default value is:
falsenodePlacementStrategy
Elk specific option affecting how nodes are placed.
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:
"BRANDES_KOEPF"nodePlacementAlignment
Elk specific option affecting Brandes-Koepf node placement alignment. NONE picks the alignment with the smallest height.
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:
"NONE"cycleBreakingStrategy
This strategy decides how to find cycles in the graph and deciding which edges need adjustment to break loops.
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:
"GREEDY_MODEL_ORDER"forceNodeModelOrder
The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.
forceNodeModelOrder
is optional
Type:
booleancannot be null
defined in: Mermaid Config
forceNodeModelOrder Type
boolean
forceNodeModelOrder Default Value
The default value is:
falseconsiderModelOrder
Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.
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:
"NODES_AND_EDGES"keepEntryNodeOnTop
Elk specific option that keeps the entry node of a recursive flow at the top of the layout.
When a flow loops back on itself (a back-edge to an earlier node), ELK's degree-based cycle-breaking has no notion of an "entry point" and may rank the first-declared node in the middle, scrambling the reading order. When enabled, the entry node of each cyclic component is pinned to the first layer so the diagram still reads from its entry. Acyclic flows always have a natural source, so this has no effect on them.
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:
false