Commit 2182f7d
committed
Add support for rendering Graphviz diagrams
I tried to add some Mermaid diagrams, but they simply do not look good.
Graphviz offers much better control over the layout.
Unfortunately, unlike Mermaid (which is a JavaScript library), Graphviz
is a command-line program, and therefore not available in the browser.
Fortunately, some helpful people maintain a WebAssembly version of
Graphviz, which _is_ a JavaScript library:
https://github.com/mdaines/viz-js
Unfortunately, unlike Mermaid (which weighs ~25kB), the GraphViz
WebAssembly weighs 1.4MB. But that's not quite correct, as Mermaid then
loads another half megabyte, whereas `viz-js` does not load anything.
The `viz-global.js` file was downloaded via:
npm pack @viz-js/[email protected]
tar Oxvf viz-js-viz-3.17.0.tgz package/dist/viz-global.js \
>static/js/viz-global.js
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 51264ff commit 2182f7d
File tree
3 files changed
+27
-0
lines changed- layouts
- _default
- _markup
- static/js
3 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
15 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments