-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_two.html
53 lines (50 loc) · 1.7 KB
/
test_two.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
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Graph Visualization</title>
<script type="text/javascript" src="(link unavailable)"></script>
<style type="text/css">
html, body, #mynetwork {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
// Create a new network
var nodes = new vis.DataSet([
{ id: 0, label: "Allama Iqbal\u2019s mausoleum" },
{ id: 1, label: "Lahore" },
{ id: 2, label: "Allama Iqbal International Airport" },
{ id: 3, label: "Karachi" },
{ id: 4, label: "Sindh" },
{ id: 5, label: "Allama Iqbal" },
{ id: 6, label: "mausoleum" }
]);
var edges = new vis.DataSet([
{ from: 0, to: 1, label: "located in the administrative territorial entity" },
{ from: 2, to: 1, label: "place served by transport hub" },
{ from: 3, to: 4, label: "located in the administrative territorial entity" },
{ from: 4, to: 3, label: "contains administrative territorial entity" },
{ from: 2, to: 1, label: "located in the administrative territorial entity" },
{ from: 5, to: 6, label: "place of burial" },
{ from: 6, to: 1, label: "located in the administrative territorial entity" },
{ from: 4, to: 3, label: "contains administrative territorial" }
]);
var container = document.getElementById("mynetwork");
var data = {
nodes: nodes,
edges: edges
};
var options = {};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>