Hacker News new | past | comments | ask | show | jobs | submit login

earnest question; why would I use this instead of graphviz?



I've used Graphviz for a long time and is still my first port of call where I need to produce the graph as a SVG or PNG.

However, if I'm putting the graph into a project in GitHub/GitLab then I'll use Mermaid as it lets me keep it inline in the markdown file itself. It's also makes it easier for other team members to maintain that graph in the documentation as it doesn't require them to run additional tooling.


It's the markup language supported by GitLab MR and Wiki; that was my first contact with it: https://docs.gitlab.com/ee/user/markdown.html#mermaid

According to a top-level comment, GitHub also supports it, too, now: https://docs.github.com/en/get-started/writing-on-github/wor...


The syntax is much simpler (albeit less powerful). It's suited to include in a markdown document where you don't know if the recipient is able to parse mermaid diagrams and ensure they get something readable.


mermaid (and similar diagrams-as-text tools) have a higher level of abstraction so they're quicker when you need something they're targeting.

Also: graphviz is good at graphs, but not every visual representation is a graph (e.g. sequence diagrams, railroad diagrams, gantt charts).


I used it to embed graphs in a single markdown document, as such quite useful.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: