Mermaid: Markdown-like generation of diagrams and flowcharts from text
github.com
github.com
My wish is for a diagram renderer with a smarter layout algorithm that heavily optimizes for direction and cleanness, understands grouping really well, and comes with easy ways to apply SVG styles. I like Google's diagrams in this regard:
http://donatz.info/wp-content/uploads/2017/10/google-cloud-a...
http://donatz.info/wp-content/uploads/2017/10/google-cloud-a...
http://donatz.info/wp-content/uploads/2017/10/google-cloud-a...
https://www.flickr.com/photos/gigile/3505955900
Note how well the overall graph fits into the rectangular format. GraphViz sucks at this. This image is not perfect though. There are a few unnecessary crossovers.
Another thing I miss in GraphViz are line jumps:
https://support.office.com/en-us/article/add-or-remove-conne...
https://archive.codeplex.com/?p=graphviz4net
I started to customize it but lacked times. The biggest challenge was to be able to convert the WPF rendering into something else, which I couldn’t figure out. I changed the canvas for another one with a better zoom function but couldn’t export or print the canvas.
Graphviz can be ported to JS, I found an example although I didn't try it.
https://mermaidjs.github.io/mermaid-live-editor/
Very cool project.
also the DOT language has been around for ages.
It's not so great with other things but worth it for that alone.
I love Graphviz, but that space badly needs more competition.
My writing process is fairly streamlined and efficient, except for generating OmniGraffle figures which takes some time.
My day job is in machine learning (30+ years) and I have considered creating a model to map my hand drawn figures to something nicer - not too difficult, except for a lack of training data.
I couldn't read their website on my mobile...
I'll give this a shot next time I might have otherwise reached for Graphviz or Lucidchart.
By which I mean it looks like a well annotated ASCII text file rather than a raw markup language in text.
Ditta looks like at least has the potential for that. If github had the ability render Ditaa it would be brilliant.
I think the main problem is that you still need the right tooling to draw it efficiently and Markdown doesn’t really require that. Eg editor plugins for reflow and drawing/resizing boxes.
https://grafana.com/plugins/jdbranham-diagram-panel
I was able to do architectural diagrams and post them as dashboards. Showing a top-level metric, then make that block red on a thresh hold breach. It gave not only a top-level view, but a performance over view as well.
An example would be the frontend web requests and average latency response, to api request count and latency than the actual database backend. All as separate blocks with individual metrics.
There is also an interactive web form [1] to try it out. You can switch between the types of diagram in the top right dropdown.
I don't think this really applies to this Mermaid library. For a Markdown-like I would expect more of an ASCII-art like input, which would look like the rendered chart also in its ASCII form.
Well, it is easy to just read and understand what it talks about (as opposed to some more opaque format) and only has the bare minimum annotations needed beyond the text labels and node names.
>For a Markdown-like I would expect more of an ASCII-art like input, which would look like the rendered chart also in its ASCII form
I don't see much value in such a scheme (even though there does exist such a program), because to produce (and later edit/update) the ASCII-art would be as tiresome and evolved as producing the final graphic document.
I'd rather write e.g something like:
label a = "start"
label b = "end"
a -> b
than draw 2 ascii art boxes, place the labels myself, and draw ascii art arrow between them.I've tried PlantUML's component mode (http://plantuml.com/component-diagram) but wondered whether there were any other options out there, as being able to write maintain source-controlled diagrams as code/text would make me very happy!
Server-side, https://tex.s2cms.com/ does a nice job and outputs svg; https://upmath.me/ by same author is markdown editor integrating it - see tikz examples there.