-
Notifications
You must be signed in to change notification settings - Fork 3
/
world-map.html
408 lines (365 loc) · 31.1 KB
/
world-map.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<!DOCTYPE html>
<html class="no-js" lang="zxx">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>BloodLytics</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" type="image/x-icon" href="assets/images/favicon.svg" />
<!-- ========================= CSS here ========================= -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="assets/css/LineIcons.3.0.css" />
<link rel="stylesheet" href="assets/css/animate.css" />
<link rel="stylesheet" href="assets/css/tiny-slider.css" />
<link rel="stylesheet" href="assets/css/glightbox.min.css" />
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="stylesheet" href="styles/india-map.css">
</head>
<!-- Start Header Area -->
<header class="header navbar-area">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-12">
<div class="nav-inner">
<!-- Start Navbar -->
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="index.html">
<img src="assets/images/BloodLytics.png" alt="Logo" style="width: 120%; height: 120%;">
</a>
<button class="navbar-toggler mobile-menu-btn" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
</button>
<div class="collapse navbar-collapse sub-menu-bar" id="navbarSupportedContent">
<ul id="nav" class="navbar-nav ms-auto">
<li class="nav-item">
<a href="index.html">Home</a>
</li>
<li class="nav-item">
<ul class="sub-menu collapse" id="submenu-1-2">
<li class="nav-item"><a href="index.html#about">About</a></li>
<li class="nav-item"><a href="index.html#visualisations">Visualisations</a></li>
</ul>
</li>
<li class="nav-item">
<a href="index.html#about" aria-label="Toggle navigation">About</a>
</li>
</ul>
</div> <!-- navbar collapse -->
<div class="button">
<a href="index.html#visualisations" class="signup">Visualisations</a>
</div>
</nav>
<!-- End Navbar -->
</div>
</div>
</div> <!-- row -->
</div> <!-- container -->
</header>
<!-- End Header Area -->
<!-- Start Services Area -->
<section class="services section " style="background-color: white;">
<div class="container" id="visualisations">
<div class="section-title">
<h3 class="wow zoomIn" data-wow-delay=".2s">Blood type distribution by country</h3>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-12 wow fadeInUp" data-wow-delay=".4s">
<div class="single-service one" style="background-color: aquamarine">
<div class="row align-items-center">
<div class="col-lg-6 col-md-4 col-12">
<p class="fw-bold" style="margin-left: 20%; margin-bottom: 1%; color: black;">Choose Blood Type</p>
<p style="color: black;">O+ A+ B+
AB+ O- A-
B- AB-</p>
<input type="range" min="1" max="8" value="1" class="slider" id="slider"
style="width: 60%;" />
</div>
<div class="col-lg-6 col-md-4 col-12">
<!-- Content for the second column goes here -->
<p style="font-weight: bold; color:black">B&W Color
</p>
<input type="range" min="1" max="2" value="1" class="slider" id="bw_or_color" />
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-12 wow fadeInUp" data-wow-delay=".4s">
<div class="single-service one" style="background-color: #D6EAF8;">
<div class="row align-items-center">
<div class="col-lg-6 col-md-4 col-12">
<div>
<div class="row">
<div class="col-md-4 col-6">
<p style="font-weight: 1000; color: blue">Distribution of Group</p>
<p id="color1_text" style="color: black;">>50% <span><svg width="14" height="14">
<circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color">
</circle>
</svg></span></p>
<p id="color2_text" style="color: black;">>40%<span><svg width="14" height="14">
<circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color">
</circle>
</svg></span></p>
<p id="color3_text" style="color: black;">>30% <span><svg width="14" height="14">
<circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color">
</circle>
</svg></span></p>
<p id="color4_text" style="color: black;">>20%<span><svg width="14" height="14">
<circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color">
</circle>
</svg></span></p>
<p style="color: black;"> Data not Available <span><svg width="14" height="14">
<circle cx="7" cy="7" r="7" fill="black"></circle>
</svg></span></p>
</div>
<div class="col-6 flex">
<p id="dynamic" style="color: black; font-weight: bold;">Blood Type O is associated with high frequencies in Central and South America, and secondly highest in Southern Africa. </p>
</div>
</div>
</div>
<div id="world-map"></div>
</div>
<div class="col-lg-6 col-md-4 col-12">
<!-- <div id="world-map"></div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<div style="text-align: center;">
<p style="font-weight: bolder; font-size: large;">ABO and Rh blood type distribution (2012 Year): <a href="https://en.wikipedia.org/wiki/Blood_type_distribution_by_country" style="color: #3366FF; text-decoration: none; font-weight: bold;"> Source Data Link</a></p>
</div>
<!-- Start Footer Area -->
<footer class="footer section">
<!-- Start Footer Top -->
<div class="footer-top">
<div class="container">
<div class="inner-content">
<div class="row">
<div class="col-lg-2 col-md-6 col-12">
<!-- Single Widget -->
<div class="single-footer f-link">
<h3>Team</h3>
<ul>
<li><a href="https://github.com/hemanth-sunkireddy">Hemanth Sunkireddy</a></li>
<li><a href="javascript:void(0)">Bharath Gajawada</a></li>
<li><a href="javascript:void(0)">Jagankrishna Nallasingu</a></li>
</ul>
</div>
<!-- End Single Widget -->
</div>
<div class="col-lg-4 col-md-6 col-12">
<!-- Single Widget -->
<div class="single-footer newsletter">
<h3>Data Visualisation Project</h3>
<div>
<p>Phase 1 Report</p>
<a class="sub-btn"
href="https://github.com/hemanth-sunkireddy/Data-visualisation-Project"><i
class="lni lni-paperclip w-100 h-100"></i>
</a>
<p>Phase 2 Report</p>
<a class="sub-btn"
href="https://github.com/hemanth-sunkireddy/Data-visualisation-Project"><i
class="lni lni-paperclip w-100 h-100"></i>
</a>
<a class="sub-btn" href="https://youtu.be/nkydSQRsNBQ"><i
class="lni lni-youtube"></i></a>
</div>
</div>
<!-- End Single Widget -->
</div>
<div class="col-lg-4 col-md-6 col-12">
<!-- Single Widget -->
<div class="single-footer newsletter">
<div class="row">
<a href="https://github.com/hemanth-sunkireddy/BloodLytics">
<img src="assets/images/github.png" width="10%">
</a>
<a href="https://www.youtube.com/watch?v=uOzVvlwPF0Y">
<img src="assets/images/youtube.png" width="10%">
</a>
<a href="https://hemanth-sunkireddy.github.io/BloodLytics/">
<img src="assets/images/brand.png" width="13%" class="m-lg-0">
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--/ End Footer Top -->
</footer>
<!--/ End Footer Area -->
<!-- ========================= scroll-top ========================= -->
<a href="#" class="scroll-top">
<i class="lni lni-chevron-up"></i>
</a>
<!-- ========================= JS here ========================= -->
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/tiny-slider.js"></script>
<script src="assets/js/glightbox.min.js"></script>
<script src="assets/js/count-up.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="d3_cdn/d3.v7.js"></script>
<script src="d3_cdn/d3.v7.min.js"></script>
<script src="scripts/d3-geo-projection.v2.min.js"></script>
<script src="scripts/d3-scale-chromatic.v1.min.js"></script>
<script src="scripts/world-map.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
var Slider = document.getElementById('bw_or_color');
var percentage = document.getElementById('slider');
var resultText = document.getElementById('dynamic');
// Function to be called when both slider and colorValues are loaded
function updateColors() {
var blackOrWhite = parseInt(Slider.value);
var percentageValue = parseInt(percentage.value);
console.log(percentageValue);
var firstColor = document.getElementById('color1_text');
var secondColor = document.getElementById('color2_text');
var thirdColor = document.getElementById('color3_text');
var fourthColor = document.getElementById('color4_text');
console.log(firstColor, secondColor, thirdColor, fourthColor);
// Select SVG elements by their IDs or classes
var svgElement1 = document.getElementById('color1_color');
var svgElement2 = document.getElementById('color2_color');
var svgElement3 = document.getElementById('color3_color');
var svgElement4 = document.getElementById('color4_color');
if (blackOrWhite == 1) {
if (percentageValue == 1) {
resultText.innerHTML = ' Blood Type O is associated with high frequencies in Central and South America, and secondly highest in Southern Africa. ';
firstColor.innerHTML = '50 - 75% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '40 - 50% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '30 - 40% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '20 - 30% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 2) {
resultText.innerHTML = 'Blood group A is associated with high frequencies in Europe, especially in Scandinavia and Central Europe, although its highest frequencies occur in some Australian Aboriginal populations and the Blackfoot Indians of Montana, US.';
firstColor.innerHTML = '35 - 47% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '27 - 35% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '20 - 27% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '10 - 20% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 3) {
resultText.innerHTML = 'Blood group B has its highest frequency in the Middle East, where it ranks as the largest share of the population. In Southeast Asia its share of the population is lowest, especially in Indonesia, secondarily in East Asia, Northern Asia and neighboring Central Asia,';
firstColor.innerHTML = '16.5 - 37% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '10 - 16.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '5 - 10% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '1 - 5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 4) {
resultText.innerHTML = 'Blood type AB is the most recent blood type and didn’t occur until the 16th Century when group A populations from Europe and group B populations from Asia began to mix.'
firstColor.innerHTML = '6.9 - 15% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '5.5 - 6.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '3.9 - 5.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.4 - 3.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 5) {
resultText.innerHTML = ' Blood type O is associated with high frequencies in Central and South America, and secondly highest in Southern Africa. ';
firstColor.innerHTML = '6.5 - 13% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '4.5 - 6.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '1 - 4.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 1% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 6) {
resultText.innerHTML = 'Blood type A is associated with high frequencies in Europe, especially in Scandinavia and Central Europe, although its highest frequencies occur in some Australian Aboriginal populations and the Blackfoot Indians of Montana, US.';
firstColor.innerHTML = '5.9 - 8% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '2.5 - 5.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '0.9 - 2.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 0.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 7) {
resultText.innerHTML = 'Blood type B has its highest frequency in the Middle East, where it ranks as the largest share of the population. In Southeast Asia its share of the population is lowest, especially in Indonesia, secondarily in East Asia, Northern Asia and neighboring Central Asia,';
firstColor.innerHTML = '1.5 - 4% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '1 - 1.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '0.5 - 1% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 0.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 8) {
resultText.innerHTML = 'Blood type AB is the most recent and didn’t occur until the 16th Century when group A populations from Europe and group B populations from Asia began to mix.'
firstColor.innerHTML = '0.8 - 1.2% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '0.3 - 0.8% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '0.1 - 0.3% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 0.1% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
}
} else {
if (percentageValue == 1) {
resultText.innerHTML = ' Blood type O is associated with high frequencies in Central and South America, and secondly highest in Southern Africa. ';
firstColor.innerHTML = '50 -75% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '40 -50% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '30 - 40% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '20 - 30% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 2) {
resultText.innerHTML = 'Blood group A is associated with high frequencies in Europe, especially in Scandinavia and Central Europe, although its highest frequencies occur in some Australian Aboriginal populations and the Blackfoot Indians of Montana, US.';
firstColor.innerHTML = '35 - 47% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '27 - 35% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '20 - 27% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '10 - 20% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 3) {
resultText.innerHTML = 'Blood type B has its highest frequency in the Middle East, where it ranks as the largest share of the population. In Southeast Asia its share of the population is lowest, especially in Indonesia, secondarily in East Asia, Northern Asia and neighboring Central Asia,';
firstColor.innerHTML = '16.5 - 37% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '10 - 16.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '5 - 10% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '1 - 5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 4) {
resultText.innerHTML = 'Blood type AB is the most recent and didn’t occur until the 16th Century when group A populations from Europe and group B populations from Asia began to mix.'
firstColor.innerHTML = '6.9 - 15% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '5.5 - 6.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '3.9 - 5.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.4 - 3.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 5) {
resultText.innerHTML = ' Blood type O is associated with high frequencies in Central and South America, and secondly highest in Southern Africa. ';
firstColor.innerHTML = '6.5 - 13% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '4.5 - 6.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '1 - 4.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 1% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 6) {
resultText.innerHTML = 'Blood group A is associated with high frequencies in Europe, especially in Scandinavia and Central Europe, although its highest frequencies occur in some Australian Aboriginal populations and the Blackfoot Indians of Montana, US.';
firstColor.innerHTML = '5.9 - 8% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '2.5 - 5.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '0.9 - 2.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 0.9% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 7) {
resultText.innerHTML = 'Blood type B has its highest frequency in the Middle East, where it ranks as the largest share of the population. In Southeast Asia its share of the population is lowest, especially in Indonesia, secondarily in East Asia, Northern Asia and neighboring Central Asia,';
firstColor.innerHTML = '1.5 - 4% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '1 - 1.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '0.5 - 1% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 0.5% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
else if (percentageValue == 8) {
resultText.innerHTML = 'Blood type AB is the most recent and didn’t occur until the 16th Century when group A populations from Europe and group B populations from Asia began to mix.'
firstColor.innerHTML = '0.8 - 1.2% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#662506" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '0.3 - 0.8% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '0.1 - 0.3% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '0.01 - 0.1% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fee391" id="color4_color"></circle></svg></span>';
}
}
}
updateColors();
Slider.addEventListener('input', function () {
updateColors();
});
percentage.addEventListener('input', function () {
updateColors();
});
});
</script>
</body>
</html>