-
Notifications
You must be signed in to change notification settings - Fork 0
/
d3js_network_graph.html
126 lines (110 loc) · 5.92 KB
/
d3js_network_graph.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<html>
<head>
<title>D3 SVG Primitives</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link rel="stylesheet" href="./css/d3js.css">
<link rel="stylesheet" href="./css/d3js_network.css">
</head>
<body>
<!-- ******** Top header ************ -->
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="./index.html">FIT5147 Data Viz Project</a>
<!-- <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap">
<a class="nav-link" href="#">Sign out</a>
</li>
</ul> -->
</nav>
<div class="container-fluid">
<!-- ******** Navigation ************ -->
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link" href="./index.html">
<span data-feather="database"></span>
Data Overview
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./d3js_word_cloud.html">
<span data-feather="bar-chart-2"></span>
Customer Satisfaction
</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="./d3js_network_graph.html">
<span data-feather="activity"></span>
Product Similarity
</a>
</li>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Saved reports</span>
<a class="d-flex align-items-center text-muted" href="#">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<!-- <li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Current month
</a>
</li> -->
</ul>
</div>
</nav>
<!-- /******** Navigation ************ -->
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<!-- Dashboard Header -->
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2 text-primary">Which albums should we buy together?</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<button class="btn btn-sm text-success btn-outline-secondary">Share</button>
<button onclick="printFunc()" class="btn btn-sm text-success btn-outline-secondary">Export</button>
</div>
<!-- <button class="btn btn-sm text-success btn-outline-secondary dropdown-toggle">
<span data-feather="calendar"></span>
This week
</button> -->
</div>
</div>
<!-- /Dashboard Header -->
<!-- Visualization : Network Graph -->
<div class="row">
<div class="col-md-8 ml-sm-auto col-lg-8 px-4">
<!-- draw the graph -->
<div class="" id="network_graph"></div>
</div>
<div class="col-md-4 ml-sm-auto col-lg-4">
<h3 class="text-success" align="center">Album Detail</h3>
<!-- replace node info whenever we click on a nde -->
<div class="" id="network_detail"></div>
</div>
</div>
<!-- Detail Content -->
<!-- <h2>Section title</h2><hr>
<div class="row">
</div> -->
</main>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<!-- Icons -->
<script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script>
<script>
feather.replace()
</script>
<!-- <script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script> -->
<!-- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="./js/d3js_network_graph.js"></script>
<script src="./js/d3js.js"></script>
</body>
</html>