Adding info in the docs for enabling elk flowcharts.

This commit is contained in:
Knut Sveidqvist
2022-12-22 11:00:30 +01:00
parent 913ba34386
commit c535b10534
2 changed files with 28 additions and 2 deletions

View File

@@ -669,7 +669,21 @@ flowchart LR
C -->|Two| E[Result two]
```
## Configuration...
## Configuration
### Renderer
The layout of the flowchart diagram can be don in multiple ways. The default rendering is done using an algorithm called dagre. It is possible to use another algorithm called **elk** for rendering flowcharts which is better for large and more complex diagrams. This is an expermental feature but worth exploring.
This can be enabled using directives by adding this in the diagram code:
```
%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%
```
Note that the site needs to use mermaid version 9.4+ for this to work and have this featured enabled in the lazy-loading configuration.
### Width
It is possible to adjust the width of the rendered flowchart.