Mermaid: Generate Diagrams and Flowcharts with Markdown Like Syntax
github.com
github.com
Best solution for me was to take pencils and scanner:
[1]: http://www.ffnn.nl/pages/articles/media/uml-diagrams-using-g...
Looking at it, my biggest criticism is that I would appreciate it more if it did share/piggyback more with graphviz's DOT language. [1]
If it could import/export DOT files it would make it easier to do things like start with Mermaid and migrate to Viz.js or graphviz itself (on a server backend somewhere) if you find for a particular graph you might need different performance characteristics or to use one of graphviz's alternate layout engines (such as a neato or twopi).
(I could especially see a use if it could manage to export its more domain-specific sequence and class diagram formats to "traditional" graphviz digraphs. Nearly all of that formatting is possible with enough work with digraphs in DOT language, but it's not a pleasure to build by hand and a DSL convertable to it would actually be generally useful, I would imagine.)
Also a easy-to-write (and read!) syntax, but so much more powerful.
See also: https://www.overleaf.com/6471895cgxfsd#/21846512/ for automatic positioning.
[1]: http://www.texample.net/tikz/examples/pgf-umlsd/
[2]: http://www.texample.net/tikz/examples/sequence-diagram/
Sure, mermaid looks even more compact, but at a huge price of flexibility. (Don't take me wrong - for sure it has its use-cases!)
Link: https://en.m.wikipedia.org/wiki/Pic_language
In which I just learnt that there exists a stand alone version that produces svg: https://ece.uwaterloo.ca/~aplevich/dpic/
As for tikz, I've used pgfplot and tickz + matlab2tikz[0] to produce TeX PDFs from MATLAB figures (it can only export figures as raster or MATLAB .fig, unusable elsewhere), and include those in a bigger PDF (given the number of figures, they had to be generated separately and then included because the memory usage was just too high).
It gives something like Fig1: https://www.dropbox.com/s/m9ah60u89jjpcx7/fighadjxusefulclea...
or Fig2: https://www.dropbox.com/s/2ilceiaqorpg3gt/fighadjxasymetric....
Fig1: Upper is a cleaned ECG signal. Middle is a Time-Frequency representation using an "Adaptive Optimal Kernel"[1]. Bottom is a Time-Frequency representation using Stockwell Transform. They look gorgeous embedded and you can zoom, contrary to MATLAB PNGs.
Fig2: baseline estimation using asymmetric least squares[2] (they used it to clean [spectro/chromato]graphy graphs and I tried it on ECG. It's really cool).
[0]: https://www.mathworks.com/matlabcentral/fileexchange/22022-m...
[1]: https://pdfs.semanticscholar.org/20c2/b82eef0809df80a402f125...
[2]: https://zanran_storage.s3.amazonaws.com/www.science.uva.nl/C...
Mermaid is a great tool, especially for flowcharts. But as with other tools like Graphviz, it can be hard/impossible to build a clean structural diagram, where you have nodes that contain or stack other nodes, with flows and relationships between them. Invariably, I find that tools like Mermaid break down once there's a lot of components, even when using boxes and so on to group things.
In particular, arrow routing is a weak point. Here [2] is an old diagram I once did in Mermaid. I was able to create two vertically-layered groups, but I was not able to prevent arrows from being messy. (There is, of course, one pair of arrows that need to cross in that diagram, but at least the software should be able to draw their intersection in a nicer way, e.g. by adding space around the arrow or have a little arch where one arrow jumps over the other.)
For complex drawings, especially graphs, I think one missing piece (in tikz and others) is to distinguish the structure vs the positioning/coloring, more or less like html and css do.
Often time a complex graph in auto generated (structure) plus manually adjusted to make it nicer (pos & colors), and it would be great to have these two pieces clearly separated for iterating faster.
I would prefer if this actually followed the plantuml syntax exactly, that way one could ditch the official java application which is quite bad (and graphs are quite ugly)
DRAKON is an algorithmic visual programming language developed within the Buran space project following ergonomic design principles. The language provides a uniform way to represent flowcharts of any complexity that are easy to read and understand.
The DRAKON Editor, which was released in September 2011, is an implementation of the language available in the public domain. It can be used for creating documentation, or for creating visual programs that can be converted to source code in other languages.
I'm using Markdown Preview Enhanced now: https://atom.io/packages/markdown-preview-enhanced
with which you can embed mermaid sketches into normal markdown documents. This is perfect for most use cases where you want a simple diagram inside a text document.
Also atom-mermaid: https://atom.io/packages/atom-mermaid which is for authoring mermaid documents.
chrome store: https://chrome.google.com/webstore/detail/chrome-diagrammer/...
https://github.com/ianmiell/learn-git-the-hard-way/blob/mast...
very very handy!
Since then I found this: http://live.yworks.com/
which looks nice but haven't used in anger.
Unfortunately, I can't find a way to break text strings onto multiple lines in ladder diagrams. Does anyone know how?
One of the examples shows <br/> tags within a Note. The <br/> is stripped out and the text is wrapped onto multiple lines within the note box, but the wrapping is completely independent of the <br/> tags.
...and this doesn't work for text on ladder diagram arrows. I find this very useful to add additional information, e.g. "POST /echo" above the arrow and the POST body below the arrow.
a => b [label="POST /echo\nHello, it's me"];
(You might like https://mscgen.js.org b.t.w.)
I'm mostly interested in a tool that can produce Flowchart, Sequence, Gantt, Dataflow, Class and Database diagrams using nothing but a CLI.
I'd appreciate any recommendations.
Gantt: ?
Flowchart, dataflow, class, database: graphviz (eg. https://github.com/globalcitizen/mysqlviz)
I had to go through all the versions at one point to make my old code work again, because I'd used a remote CDN or something at one point.
Excellent tool otherwise, haven't seen anything better so far.
I can't say that I've even seen a CDN without versioning support; the closest I've seen is that some READMEs for GitHub packages will suggest the RawGit CDN that reflects the GitHub namespace and point to something like the master branch instead of a version tag. I've sent a PR to correct at least one of those that I had come across, but it's also something to realize that if you are using a CDN like RawGit, check the tag/branch you are using.
A CDN doesn't do versioning support, it serves files and respect the caching headers it was given.
A CDN built for public usage (ie, that you do not run yourself DIY style, and isn't a corporate internal CDN they don't expect outsiders to reuse) that is built to serve JS (and often CSS, too) will through necessity provide some versioning mechanism. As I said, if you find a CDN that is serving JS files and doesn't have some sort of versioning mechanism or policy in place then you find a better CDN. I think at this point good versions strategies is a requirement for a good CDN.
Take MaxCDN as a good example since it is one of the most common CDNs at this point for JS/CSS (Bootstrap, Font Awesome, Twemoji, ...): all of their URLs have version numbers in their path structure (/bootstrap/3.3.7/...).
RawGit is probably the next most common I see, thanks to it making it very easy for anyone to CDN access a GitHub repo. As I mentioned before: RawGit uses git branches and tags in its folder structure for version management. If you are using a RawGit URL with /master/ in the URL you should switch to a version tag pronto (and that's not RawGit's fault, it's yours for giving it a floating version requirement).
Highly recommended.
if you're using grafana, it allows you to generate mermaid-powered diagrams powered from your tsdb.
check it out: https://grafana.net/plugins/jdbranham-diagram-panel