-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path03_uniform_cost.html
34 lines (33 loc) · 1.06 KB
/
03_uniform_cost.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
<html lang="en">
<head>
<title>Test</title>
<script type="text/javascript" src="vis-network.min.js"></script>
<script type="text/javascript" src="03_uniform_cost.js"></script>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
// create a network
var container = document.getElementById("mynetwork");
var DOTstring = costo('A','F')
var parsedData = vis.parseDOTNetwork(DOTstring);
var data = {
nodes: parsedData.nodes,
edges: parsedData.edges
}
var options = {
layout: {
hierarchical: {
levelSeparation: 100,
nodeSpacing: 100,
parentCentralization: true,
direction: 'UD', // UD, DU, LR, RL
sortMethod: 'directed', // hubsize, directed
shakeTowards: 'roots' // roots, leaves
},
},
};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>