-
Notifications
You must be signed in to change notification settings - Fork 0
/
third.html
232 lines (204 loc) · 6.14 KB
/
third.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html>
<head>
<!--script data-require="[email protected]" data-semver="3.5.3" src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.js"></script-->
<script src="http://d3js.org/d3.v4.min.js"></script>
<style>
.axis path,
.axis line {
stroke: #000;
fill:none;
shape-rendering: crispEdges;
}
div.sticky {
top: 0;
padding: 0.1px;
background-color: #cae8ca;
}
.line {
stroke: steelblue;
fill:none;
stroke-width: 1.5px;
}
.line2 {
stroke: steelblue;
fill:none;
stroke-width: 1.5px;
}
h1 {
padding-left: 10px;
}
h2 {
padding-left: 10px;
padding-bottom: 10px;
top: 20px;
color:burlywood;
}
h3 {
padding-left: 45px;
}
h5 {
padding-left: 45px;
}
#buttonplayer{
position:absolute;
top:30px;
right:100px;
width: 140px;
}
#buttonwages{
position:absolute;
top:50px;
right:100px;
width: 140px;
}
#changepage {
position:absolute;
top:10px;
right:100px;
height: 250px;
}
#lineTitle1{
position:absolute;
top: 130px;
left: 360px;
}
#multilinewage{
position:absolute;
top:180px;
left:360px;
}
#lineTitle2{
position:absolute;
top: 470px;
left: 360px;
}
#multilinestats {
position:absolute;
top:520px;
left:360px;
}
#insight{
position:absolute;
top:470px;
}
#insightsection{
position:absolute;
font: 13px sans-serif;
top:530px;
width:260px;
left:55px;
line-height: 1.5;
}
#next{
position:absolute;
top:710px;
}
#nextsections{
position:absolute;
font: 13px sans-serif;
top:740px;
width:300px;
left:65px;
}
#dropdown_title {
position:absolute;
font: 12px sans-serif;
top:180px;
left:145px;
}
#radio1{
position:absolute;
left: 150px;
top: 230px;
}
#radio2{
position:absolute;
left: 150px;
top: 270px;
}
#radio3{
position:absolute;
left: 150px;
top: 310px;
}
#radio4{
position:absolute;
left: 150px;
top: 350px;
}
</style>
</head>
<div class='radio'>
<label id='radio1'>
<input type="radio" name="gender" value="ST" onclick='change(this.value)' checked> Striker
</label>
<label id='radio2'>
<input type="radio" name="gender" value="CM" onclick='change(this.value)'> Midfielder
</label>
<label id='radio3'>
<input type="radio" name="gender" value="CB" onclick='change(this.value)'> Defender
</label>
<label id='radio4'>
<input type="radio" name="gender" value="GK" onclick='change(this.value)'> Goalkeeper
</label>
</div>
<div id="Page">
<button id="buttonplayer" onclick="location.href='index%202.html'" value="Players">Home: Leagues Stats</button>
<button id="buttonwages" onclick="location.href='second.html'" value="Players">Back: Player Stats</button>
</div>
<p id = 'dropdown_title' style="font-family: arial;" >Change Position:</p>
<body>
<div class="sticky">
<h1 style="font-family: arial;">Top 5 Leagues and Players</h1>
</div>
<img STYLE="position:absolute; TOP:5px; LEFT:520px; WIDTH:150px; HEIGHT:100px" SRC="./data/epl.png">
<img STYLE="position:absolute; TOP:10px; LEFT:680px; WIDTH:80px; HEIGHT:80px" SRC="./data/laliga.png">
<img STYLE="position:absolute; TOP:5px; LEFT:750px; WIDTH:140px; HEIGHT:90px" SRC="./data/bundesliga.png">
<img STYLE="position:absolute; TOP:15px; LEFT:880px; WIDTH:60px; HEIGHT:70px" SRC="./data/seriea.png">
<img STYLE="position:absolute; TOP:15px; LEFT:955px; WIDTH:70px; HEIGHT:70px" SRC="./data/ligue1.png">
<h2 style="font-family: arial;">Relationship Between Wage, Stats and Age</h2>
<h3 id='insight' style="font-family: arial;">Some Insight</h3>
<div id='insightsection'>
<p style="font-family: arial;">
<ul>
<li>Strikers make the most at age 33 </li><br />
<li>Golden age is early 20s to early 30s.</li><br />
<li>Top goalkeepers wage grow as they gets older.</li><br />
</ul>
</p>
</div>
<h4 id='lineTitle1' style="font-family: arial;">Average Wage vs Age</h4>
<h4 id='lineTitle2' style="font-family: arial;">Average Stats vs Age</h4>
<div id='multilinewage'></div>
<div id='multilinestats'></div>
<script src="./script/line_wage.js"></script>
<script src="./script/line_stats.js"></script>
<script>
// defualts striker
DrawMultiLine_wage('ST_wage.tsv')
DrawMultiLine_stats('ST_wage.tsv')
// update line chart
d3.selectAll("#leagues").on("change", change);
function change(value){
//console.log(value)
if(value=="ST"){
DrawMultiLine_wage('ST_wage.tsv');
DrawMultiLine_stats('ST_wage.tsv');
};
if(value=="CM"){
DrawMultiLine_wage('CM_wage.tsv');
DrawMultiLine_stats('CM_wage.tsv');
};
if(value=="CB"){
DrawMultiLine_wage('CB_wage.tsv');
DrawMultiLine_stats('CB_wage.tsv');
};
if(value=="GK"){
DrawMultiLine_wage('GK_wage.tsv');
DrawMultiLine_stats('GK_wage.tsv');
};
}
</script>
</body>
</html>