forked from eregon/virtual-machines-research-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (42 loc) · 1.36 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="https://unpkg.com/@hpcc-js/[email protected]/dist/index.min.js"></script>
<script src="https://unpkg.com/[email protected]/build/d3-graphviz.js"></script>
</head>
<body>
<h1>Virtual Machine Research Overview</h1>
<p><strong>Disclaimer:</strong> It's not assumed this overview is complete in any way.</p>
<p><a href="https://github.com/eregon/virtual-machines-research-graph/edit/master/graph.dot">Edit on GitHub</a></p>
<div id="graph" style="text-align: center;"></div>
<script>
const dataPromise = fetch('https://raw.githubusercontent.com/eregon/virtual-machines-research-graph/master/graph.dot')
.then((response) => {
return response.text();
});
var dotIndex = 0;
var graphviz = d3.select("#graph").graphviz()
.transition(function () {
return d3.transition("main")
.ease(d3.easeLinear)
.delay(500)
.duration(1500);
})
.logEvents(true)
.on("initEnd", triggerRender);
let triggerRenderResolve;
const triggerRenderP = new Promise(function(resolve, reject) {
triggerRenderResolve = resolve;
});
function triggerRender() {
triggerRenderResolve();
}
Promise.all([dataPromise, triggerRenderP]).then(function(values) {
const dot = values[0];
graphviz.renderDot(dot);
});
</script>
</body>
</html>