-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.html
51 lines (48 loc) · 1.96 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
50
51
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>娱乐圈明星关系图谱-by古柳DesertsX</title>
<script type="text/javascript" src="./static/lib/interactive-graph-0.1.0/interactive-graph.min.js"></script>
<link type="text/css" rel="stylesheet" href="./static/lib/interactive-graph-0.1.0/interactive-graph.min.css">
<script src="./static/lib/jquery-3.2.1/jquery-3.2.1.min.js"></script>
<script src="./static/lib/jquery-3.2.1/jquery-ui.js"></script>
<link rel="stylesheet" href="./static/lib/jquery-3.2.1/jquery-ui.css">
<link href="./static/lib/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet">
<style type="text/css">
body {
margin: 0px;
font-size: 14px;
}
#graphArea {
height: 100%;
border: 1px solid lightgray;
}
</style>
</head>
<body>
<div style="height:100%">
<div id="graphArea"></div>
</div>
<script type="text/javascript">
igraph.i18n.setLanguage("chs");
var app = new igraph.GraphNavigator(document.getElementById('graphArea'));
app.loadGson("./static/ylq_star_relation_graph_v2.json", {
"onGetNodeDescription": function (node) {
var description = "<p align=center>";
if (node.image !== undefined) {
description += "<img src='" + node.image + "' width=150/><br>";
}
description += "<b>" + node.label + "</b>" + "[" + node.id + "]";
description += "</p>";
if (node.info !== undefined) {
description += "<p align=left>" + node.info + "</p>";
} else {
if (node.title !== undefined)
description += "<p align=left>" + node.title + "</p>";
}
return description;
}
}, function () {});
</script>
</body>
</html>