Skip to content

Instantly share code, notes, and snippets.

@magjac
Last active February 22, 2024 17:46
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save magjac/a23d1f1405c2334f288a9cca4c0ef05b to your computer and use it in GitHub Desktop.
d3-graphviz Basic Example
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="//d3js.org/d3.v5.min.js"></script>
<script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script>
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.js"></script>
<div id="graph" style="text-align: center;"></div>
<script>
d3.select("#graph").graphviz()
.renderDot('digraph {a -> b}');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment