Created
April 23, 2020 15:23
-
-
Save dajulia3/f522e624272ebd2911752f7c6f01514c to your computer and use it in GitHub Desktop.
HTML to visualize dot file in browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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.6/dist/index.min.js"></script> | |
<script src="https://unpkg.com/d3-graphviz@3.0.0/build/d3-graphviz.js"></script> | |
<script type="text/javascript"> | |
dependencyData='digraph {a -> b}' //REPLACE ME WITH THE REAL DATA | |
</script> | |
<div id="graph" style="text-align: center;"></div> | |
<script> | |
d3.select("#graph").graphviz() | |
.renderDot(dependencyData); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment