-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elk renderer dont work in mermaid 11.0.2 version #5782
Comments
@zszen Thanks for reporting. We have updated the syntax for selecting layout algorithms are select from the code. The new syntax would be like this:
The old way should still work though, we will add a fix for this in the next mermaid release. |
#5782 fix: adding backwards compatability for defaultRenderer directive
in v11 version mermaid not contain elk layout, and I can't easy find out the js... |
ELK layout is still broken in 11.* versions |
For those who use 11.* versions and cannot use ELK layout, check if you have the engine loaded and registered since the engine is not included by default. This is somehow not very well documented. With bundlers import mermaid from 'mermaid';
import elkLayouts from '@mermaid-js/layout-elk';
// load and register the engine
mermaid.registerLayoutLoaders(elkLayouts);
// ...
// mermaid.initialize(config); or with CDN <script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
import elkLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0/dist/mermaid-layout-elk.esm.min.mjs';
// load and register the engine
mermaid.registerLayoutLoaders(elkLayouts);
// ...
// mermaid.initialize(config);
</script> See https://www.jsdelivr.com/package/npm/@mermaid-js/layout-elk |
@TimJJTing: Not only is it not well documented, the existing documentation is incorrect 🤦 : #6273 |
Description
%%{init: {'theme': 'neutral' ,'flowchart': {'defaultRenderer': 'elk' }}}%%
elk renderer dont work in mermaid 11.0.2 version. But ok when back to 10.x
Steps to reproduce
using elk renderer in 11.0.2
Screenshots
No response
Code Sample
No response
Setup
Suggested Solutions
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: