Update index.html
Browse files- index.html +133 -17
index.html
CHANGED
|
@@ -87,6 +87,11 @@
|
|
| 87 |
padding: 20px;
|
| 88 |
border-radius: 10px;
|
| 89 |
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
|
| 92 |
canvas {
|
|
@@ -136,6 +141,7 @@
|
|
| 136 |
<div class="chart-box">
|
| 137 |
<canvas id="connectionsChart"></canvas>
|
| 138 |
<canvas id="webinarChart"></canvas>
|
|
|
|
| 139 |
</div>
|
| 140 |
|
| 141 |
|
|
@@ -144,6 +150,7 @@
|
|
| 144 |
<div class="chart-box">
|
| 145 |
<canvas id="supportTimeChart"></canvas>
|
| 146 |
<canvas id="webinarTime"></canvas>
|
|
|
|
| 147 |
</div>
|
| 148 |
|
| 149 |
<!-- <div class="chart-container">
|
|
@@ -155,20 +162,22 @@
|
|
| 155 |
</div>
|
| 156 |
</div> -->
|
| 157 |
</div>
|
|
|
|
| 158 |
|
|
|
|
| 159 |
<script>
|
| 160 |
var locations = [
|
| 161 |
-
{ name: "Ragusa", coords: [36.9257, 14.7244], category: "operative", connections: 12, avgSupportTime: 12 }, // Ragusa, Italia
|
| 162 |
-
{ name: "Seville", coords: [37.3886, -5.9823], category: "operative", connections: 5, avgSupportTime: 1 }, // Sevilla, España
|
| 163 |
-
{ name: "Groningen", coords: [53.2194, 6.5665], category: "operative", connections: 7, avgSupportTime: 3 }, // Groningen, Países Bajos
|
| 164 |
-
{ name: "Cape Town", coords: [-33.9249, 18.4241], category: "operative", connections: 1, avgSupportTime: 0 }, // Ciudad del Cabo, Sudáfrica
|
| 165 |
-
{ name: "Bern", coords: [46.9481, 7.4474], category: "operative", connections: 0, avgSupportTime: 0 }, // Berna, Suiza
|
| 166 |
-
{ name: "Kiel", coords: [54.3233, 10.1228], category: "removed", connections: 0, avgSupportTime: 0 }, // Kiel, Alemania
|
| 167 |
-
{ name: "Le Mans", coords: [17.0151, 54.0924], category: "assessment", connections: 0, avgSupportTime: 0 }, // Salalah, Omán
|
| 168 |
-
{ name: "Le Mans", coords: [48.0077, 0.1996], category: "assessment", connections: 0, avgSupportTime: 0 }, // Le Mans, Francia
|
| 169 |
-
{ name: "Gdansk", coords: [54.3520, 18.6466], category: "assessment", connections: 0, avgSupportTime: 0 }, // Gdansk, Polonia
|
| 170 |
-
{ name: "Prague", coords: [50.0755, 14.4378], category: "assessment", connections: 0, avgSupportTime: 0 }, // Praga, República Checa
|
| 171 |
-
{ name: "Kuwait", coords: [29.3759, 47.9774], category: "assessment", connections: 0, avgSupportTime: 0 } // Kuwait, Kuwait
|
| 172 |
];
|
| 173 |
|
| 174 |
var map = L.map('map').setView([50.0755, 14.4378], 3);
|
|
@@ -191,6 +200,8 @@
|
|
| 191 |
var chart2 = null;
|
| 192 |
var chart3 = null;
|
| 193 |
var chart4 = null;
|
|
|
|
|
|
|
| 194 |
|
| 195 |
function updateMarkers() {
|
| 196 |
var selectedCategory = document.getElementById("category").value;
|
|
@@ -224,16 +235,27 @@
|
|
| 224 |
updateCharts(filteredLocations);
|
| 225 |
}
|
| 226 |
|
|
|
|
|
|
|
|
|
|
| 227 |
function updateCharts(filteredLocations) {
|
| 228 |
var cityNames = filteredLocations.map(location => location.name);
|
| 229 |
-
|
|
|
|
| 230 |
var avgSupportTimeData = filteredLocations.map(location => location.avgSupportTime);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
var categoryColorsData = filteredLocations.map(location => categoryColors[location.category]);
|
| 232 |
|
| 233 |
if (chart1) chart1.destroy();
|
| 234 |
if (chart2) chart2.destroy();
|
| 235 |
if (chart3) chart3.destroy();
|
| 236 |
if (chart4) chart4.destroy();
|
|
|
|
|
|
|
| 237 |
|
| 238 |
var ctx1 = document.getElementById('connectionsChart').getContext('2d');
|
| 239 |
chart1 = new Chart(ctx1, {
|
|
@@ -323,7 +345,7 @@
|
|
| 323 |
}
|
| 324 |
}
|
| 325 |
});
|
| 326 |
-
|
| 327 |
var ctx3 = document.getElementById('webinarChart').getContext('2d');
|
| 328 |
chart3 = new Chart(ctx3, {
|
| 329 |
type: 'bar',
|
|
@@ -331,7 +353,7 @@
|
|
| 331 |
labels: cityNames,
|
| 332 |
datasets: [{
|
| 333 |
label: 'Average Monthly Webinar Connections',
|
| 334 |
-
data:
|
| 335 |
backgroundColor: categoryColorsData,
|
| 336 |
borderColor: '#333',
|
| 337 |
borderWidth: 1,
|
|
@@ -374,8 +396,100 @@
|
|
| 374 |
data: {
|
| 375 |
labels: cityNames,
|
| 376 |
datasets: [{
|
| 377 |
-
label: 'Average Monthly Webinar Time (hrs)',
|
| 378 |
-
data:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 379 |
backgroundColor: categoryColorsData,
|
| 380 |
borderColor: '#333',
|
| 381 |
borderWidth: 1,
|
|
@@ -388,7 +502,7 @@
|
|
| 388 |
legend: { display: false },
|
| 389 |
title: {
|
| 390 |
display: true,
|
| 391 |
-
text: 'Average Monthly
|
| 392 |
font: {
|
| 393 |
size: 12
|
| 394 |
},
|
|
@@ -420,3 +534,5 @@
|
|
| 420 |
</body>
|
| 421 |
</html>
|
| 422 |
|
|
|
|
|
|
|
|
|
| 87 |
padding: 20px;
|
| 88 |
border-radius: 10px;
|
| 89 |
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 90 |
+
/*NUEVO*/
|
| 91 |
+
/*height: 100px;*/ /* Aumenta la altura del contenedor */
|
| 92 |
+
/*display: flex;
|
| 93 |
+
justify-content: center;
|
| 94 |
+
align-items: center;*/
|
| 95 |
}
|
| 96 |
|
| 97 |
canvas {
|
|
|
|
| 141 |
<div class="chart-box">
|
| 142 |
<canvas id="connectionsChart"></canvas>
|
| 143 |
<canvas id="webinarChart"></canvas>
|
| 144 |
+
<canvas id="recordingChart"></canvas>
|
| 145 |
</div>
|
| 146 |
|
| 147 |
|
|
|
|
| 150 |
<div class="chart-box">
|
| 151 |
<canvas id="supportTimeChart"></canvas>
|
| 152 |
<canvas id="webinarTime"></canvas>
|
| 153 |
+
<canvas id="recordingTime"></canvas>
|
| 154 |
</div>
|
| 155 |
|
| 156 |
<!-- <div class="chart-container">
|
|
|
|
| 162 |
</div>
|
| 163 |
</div> -->
|
| 164 |
</div>
|
| 165 |
+
|
| 166 |
|
| 167 |
+
|
| 168 |
<script>
|
| 169 |
var locations = [
|
| 170 |
+
{ name: "Ragusa", coords: [36.9257, 14.7244], category: "operative", connections: 12, avgSupportTime: 12, webinars: 1, avgWebinarTime: 1 , recordings: 0, avgRecordingTime: 0}, // Ragusa, Italia
|
| 171 |
+
{ name: "Seville", coords: [37.3886, -5.9823], category: "operative", connections: 5, avgSupportTime: 1, webinars: 2, avgWebinarTime: 1 , recordings: 0, avgRecordingTime: 0}, // Sevilla, España
|
| 172 |
+
{ name: "Groningen", coords: [53.2194, 6.5665], category: "operative", connections: 7, avgSupportTime: 3, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0}, // Groningen, Países Bajos
|
| 173 |
+
{ name: "Cape Town", coords: [-33.9249, 18.4241], category: "operative", connections: 1, avgSupportTime: 0, webinars: 7, avgWebinarTime: 1 , recordings: 0, avgRecordingTime: 0}, // Ciudad del Cabo, Sudáfrica
|
| 174 |
+
{ name: "Bern", coords: [46.9481, 7.4474], category: "operative", connections: 0, avgSupportTime: 0, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0}, // Berna, Suiza
|
| 175 |
+
{ name: "Kiel", coords: [54.3233, 10.1228], category: "removed", connections: 0, avgSupportTime: 0, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0}, // Kiel, Alemania
|
| 176 |
+
{ name: "Le Mans", coords: [17.0151, 54.0924], category: "assessment", connections: 0, avgSupportTime: 0, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0}, // Salalah, Omán
|
| 177 |
+
{ name: "Le Mans", coords: [48.0077, 0.1996], category: "assessment", connections: 0, avgSupportTime: 0, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0}, // Le Mans, Francia
|
| 178 |
+
{ name: "Gdansk", coords: [54.3520, 18.6466], category: "assessment", connections: 0, avgSupportTime: 0, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0}, // Gdansk, Polonia
|
| 179 |
+
{ name: "Prague", coords: [50.0755, 14.4378], category: "assessment", connections: 0, avgSupportTime: 0, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0}, // Praga, República Checa
|
| 180 |
+
{ name: "Kuwait", coords: [29.3759, 47.9774], category: "assessment", connections: 0, avgSupportTime: 0, webinars: 0, avgWebinarTime: 0 , recordings: 0, avgRecordingTime: 0} // Kuwait, Kuwait
|
| 181 |
];
|
| 182 |
|
| 183 |
var map = L.map('map').setView([50.0755, 14.4378], 3);
|
|
|
|
| 200 |
var chart2 = null;
|
| 201 |
var chart3 = null;
|
| 202 |
var chart4 = null;
|
| 203 |
+
var chart5 = null;
|
| 204 |
+
var chart6 = null;
|
| 205 |
|
| 206 |
function updateMarkers() {
|
| 207 |
var selectedCategory = document.getElementById("category").value;
|
|
|
|
| 235 |
updateCharts(filteredLocations);
|
| 236 |
}
|
| 237 |
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
|
| 241 |
function updateCharts(filteredLocations) {
|
| 242 |
var cityNames = filteredLocations.map(location => location.name);
|
| 243 |
+
|
| 244 |
+
var connectionsData = filteredLocations.map(location => location.connections);
|
| 245 |
var avgSupportTimeData = filteredLocations.map(location => location.avgSupportTime);
|
| 246 |
+
var webinarData = filteredLocations.map(location => location.webinars);
|
| 247 |
+
var avgWebinarTimeData = filteredLocations.map(location => location.avgWebinarTime);
|
| 248 |
+
var recordingData = filteredLocations.map(location => location.recordings);
|
| 249 |
+
var avgRecordingTimeData = filteredLocations.map(location => location.avgRecordingTime);
|
| 250 |
+
|
| 251 |
var categoryColorsData = filteredLocations.map(location => categoryColors[location.category]);
|
| 252 |
|
| 253 |
if (chart1) chart1.destroy();
|
| 254 |
if (chart2) chart2.destroy();
|
| 255 |
if (chart3) chart3.destroy();
|
| 256 |
if (chart4) chart4.destroy();
|
| 257 |
+
if (chart5) chart3.destroy();
|
| 258 |
+
if (chart6) chart4.destroy();
|
| 259 |
|
| 260 |
var ctx1 = document.getElementById('connectionsChart').getContext('2d');
|
| 261 |
chart1 = new Chart(ctx1, {
|
|
|
|
| 345 |
}
|
| 346 |
}
|
| 347 |
});
|
| 348 |
+
|
| 349 |
var ctx3 = document.getElementById('webinarChart').getContext('2d');
|
| 350 |
chart3 = new Chart(ctx3, {
|
| 351 |
type: 'bar',
|
|
|
|
| 353 |
labels: cityNames,
|
| 354 |
datasets: [{
|
| 355 |
label: 'Average Monthly Webinar Connections',
|
| 356 |
+
data: webinarData,
|
| 357 |
backgroundColor: categoryColorsData,
|
| 358 |
borderColor: '#333',
|
| 359 |
borderWidth: 1,
|
|
|
|
| 396 |
data: {
|
| 397 |
labels: cityNames,
|
| 398 |
datasets: [{
|
| 399 |
+
label: 'Average Monthly Webinar Time (hrs/session)',
|
| 400 |
+
data: avgWebinarTimeData,
|
| 401 |
+
backgroundColor: categoryColorsData,
|
| 402 |
+
borderColor: '#333',
|
| 403 |
+
borderWidth: 1,
|
| 404 |
+
borderRadius: 5,
|
| 405 |
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.2)'
|
| 406 |
+
}]
|
| 407 |
+
},
|
| 408 |
+
options: {
|
| 409 |
+
plugins: {
|
| 410 |
+
legend: { display: false },
|
| 411 |
+
title: {
|
| 412 |
+
display: true,
|
| 413 |
+
text: 'Average Monthly Webinar Time (hrs/session)',
|
| 414 |
+
font: {
|
| 415 |
+
size: 12
|
| 416 |
+
},
|
| 417 |
+
color: '#333'
|
| 418 |
+
}
|
| 419 |
+
},
|
| 420 |
+
scales: {
|
| 421 |
+
x: {
|
| 422 |
+
ticks: { color: '#333' },
|
| 423 |
+
grid: { display: false }
|
| 424 |
+
},
|
| 425 |
+
y: {
|
| 426 |
+
ticks: { color: '#333' },
|
| 427 |
+
grid: { color: 'rgba(0,0,0,0.1)' }
|
| 428 |
+
}
|
| 429 |
+
},
|
| 430 |
+
animation: {
|
| 431 |
+
duration: 1000,
|
| 432 |
+
easing: 'easeInOutBounce'
|
| 433 |
+
}
|
| 434 |
+
}
|
| 435 |
+
});
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
|
| 439 |
+
/*RECORDINGS*/
|
| 440 |
+
|
| 441 |
+
var ctx5 = document.getElementById('recordingChart').getContext('2d');
|
| 442 |
+
chart5 = new Chart(ctx5, {
|
| 443 |
+
type: 'bar',
|
| 444 |
+
data: {
|
| 445 |
+
labels: cityNames,
|
| 446 |
+
datasets: [{
|
| 447 |
+
label: 'Average Monthly Recordings',
|
| 448 |
+
data: recordingData,
|
| 449 |
+
backgroundColor: categoryColorsData,
|
| 450 |
+
borderColor: '#333',
|
| 451 |
+
borderWidth: 1,
|
| 452 |
+
borderRadius: 5,
|
| 453 |
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.2)'
|
| 454 |
+
}]
|
| 455 |
+
},
|
| 456 |
+
options: {
|
| 457 |
+
plugins: {
|
| 458 |
+
legend: { display: false },
|
| 459 |
+
title: {
|
| 460 |
+
display: true,
|
| 461 |
+
text: 'Monthly Recordings',
|
| 462 |
+
font: {
|
| 463 |
+
size: 12
|
| 464 |
+
},
|
| 465 |
+
color: '#333'
|
| 466 |
+
}
|
| 467 |
+
},
|
| 468 |
+
scales: {
|
| 469 |
+
x: {
|
| 470 |
+
ticks: { color: '#333' },
|
| 471 |
+
grid: { display: false }
|
| 472 |
+
},
|
| 473 |
+
y: {
|
| 474 |
+
ticks: { color: '#333' },
|
| 475 |
+
grid: { color: 'rgba(0,0,0,0.1)' }
|
| 476 |
+
}
|
| 477 |
+
},
|
| 478 |
+
animation: {
|
| 479 |
+
duration: 1000,
|
| 480 |
+
easing: 'easeInOutBounce'
|
| 481 |
+
}
|
| 482 |
+
}
|
| 483 |
+
});
|
| 484 |
+
|
| 485 |
+
var ctx6 = document.getElementById('recordingTime').getContext('2d');
|
| 486 |
+
chart6 = new Chart(ctx6, {
|
| 487 |
+
type: 'bar',
|
| 488 |
+
data: {
|
| 489 |
+
labels: cityNames,
|
| 490 |
+
datasets: [{
|
| 491 |
+
label: 'Average Monthly Recording Time (hrs)',
|
| 492 |
+
data: avgRecordingTimeData,
|
| 493 |
backgroundColor: categoryColorsData,
|
| 494 |
borderColor: '#333',
|
| 495 |
borderWidth: 1,
|
|
|
|
| 502 |
legend: { display: false },
|
| 503 |
title: {
|
| 504 |
display: true,
|
| 505 |
+
text: 'Average Monthly Recording Time (hrs)',
|
| 506 |
font: {
|
| 507 |
size: 12
|
| 508 |
},
|
|
|
|
| 534 |
</body>
|
| 535 |
</html>
|
| 536 |
|
| 537 |
+
|
| 538 |
+
|