Created
April 23, 2018 05:16
-
-
Save magjac/aa887717385a9c5f9742b9a64f179705 to your computer and use it in GitHub Desktop.
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/[email protected]/viz.js" type="javascript/worker"></script> | |
<script src="https://unpkg.com/[email protected]/build/d3-graphviz.min.js"></script> | |
<div id="graph" style="text-align: center;"></div> | |
<script> | |
dotSrc = ` | |
digraph { | |
node [shape = box, color=blue]; | |
edge [dir = none]; | |
I0000 [label=<<table border="0" cellborder="0"><tr><td><img src="http://yuanqingfei.me/images/sparrow2.jpeg" width="50" height="60"/></td></tr><tr><td>清<br/>袁<br/>1122</td></tr></table>>] | |
} | |
`; | |
d3.select("#graph").graphviz() | |
.addImage("http://yuanqingfei.me/images/sparrow2.jpeg", 50, 60) | |
.renderDot(dotSrc); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment