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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing config to mermaid diagram #58
Comments
@ad1992 by passing the following configuration, it will parse it in mermaid live editor: |
It doesn't work for me @subratsri , here is the link |
Thinking about this again, I think we shouldn't be allowing custom configs by users as its not really needed and might overwhelm the user (with a separate field for config), and moreover will complicate the excal diagram generation as there is a long list configs supported by Mermaid. Instead, we can increase the range of text and edges to decent number so that the diagrams work. |
@ad1992 that sound like a good work around as the list is really long for supported params. |
Yes I am up for keeping it at a higher number, whats a decent number as per your requirements? |
The settings I shared above + some extra should do, so "maxEdges": 3500, "maxTextSize": 200000 should be more than enough. |
Hmm still I think the text size is just too large for a diagram :) |
Ya, I guess text size can be managed with substitution. Probably we can have text size as some multiple of edges e.g. each edge can have 30 chars so maxTextSize become 3500*30 = 105000. |
@subratsri I am curious to know, how you use these diagrams ? And are these created programmatically? |
@ad1992 we are using it to visualize our Contact Center flow, basically all the paths a customer can take in our IVR. This diagram in excalidraw will help our business to see and suggest changes to the flow rather than knowing the technical logic behind it. Currently it looks something like this in Genesys Architect |
@subratsri in that case instead of altering the config in excalidraw editor how about exposing an API from mermaid-to-excalidraw where you can pass in your own config which gives you excalidraw elements and that you can pass to excalidraw editor directly? |
@ad1992 for us that works, it will give us an option to pass every config (if we decided to do so) of mermaid graph. |
Great then I will create a public API soon for it which you can use. Yes config would work as long as transformation to excalidraw is supported, for eg properties like |
Sure, that will work |
Requested in https://discord.com/channels/723672430744174682/1234480820262142033
This would need to pass site config on initialization similar to how it happens in the mermaid live editor.
Test 馃憞馃徎
Main_Flow_v35-0.txt
Throws max edge exceeded so setting the max edge to
5000
fixes the error related to edges.The text was updated successfully, but these errors were encountered: