-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
85 lines (73 loc) · 3.25 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
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
<!-- the chart idea was borrowed from [gapminder](https://www.gapminder.org/answers/how-does-income-relate-to-life-expectancy/) -->
<!-- [data] (https://github.com/adamjanes/udemy-d3/blob/master/05/5.10.0/data/data.json) -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title class="chartName"></title>
<!-- jQuery UI CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.structure.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.theme.min.css">
<!-- D3 Tooltip CSS -->
<link rel="stylesheet" href="css/d3-tip.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css">
</head>
<body>
<nav class="navbar navbar-default">
<div class="container" >
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8">
<a class="navbar-brand" href="#"><span class="chartName"></span></a>
</div>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-2">
<button id="play-button" class="btn btn-primary">Play</button>
<button id="reset-button" class="btn btn-primary">Reset</button>
</div>
<div class="col-md-4">
<div id="slider-div">
<label>Year: <span id="year">1800</span></label>
<div id="date-slider">
</div>
</div>
</div>
<div class="col-md-2">
<select id="continent-select" class="form-control">
<option selected value="all">All</option>
<option value="europe">Europe</option>
<option value="asia">Asia</option>
<option value="americas">Americas</option>
<option value="africa">Africa</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="chart-area">
</div>
</div>
</div>
</div>
<!-- External JS libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.9.2/d3.min.js"></script>
<script src="js/d3-tip.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
<!-- Custom JS -->
<script src="js/mainProject.js"></script>
<!-- Add chart name where required -->
<script>
$(".chartName").each(function() {
$( this ).html("D3 Chart: Global Relationship between Income and Life Expectancy")
});
</script>
</body>
</html>