finished similverifica atleti
This commit is contained in:
parent
185f31601e
commit
ba05612a57
5 changed files with 74 additions and 12 deletions
|
@ -17,6 +17,8 @@ include "includes/security.php";
|
|||
<div class="container">
|
||||
<h1>Statistiche dei voti</h1>
|
||||
<canvas id="statistiche"></canvas>
|
||||
<canvas id="statistichePC"></canvas>
|
||||
<canvas id='statisicheBrowser'></canvas>
|
||||
</div>
|
||||
|
||||
<?php require "includes/footer.php" ?>
|
||||
|
@ -24,14 +26,55 @@ include "includes/security.php";
|
|||
|
||||
<script>
|
||||
const ctx = document.getElementById('statistiche');
|
||||
const statsPC = document.getElementById('statistichePC');
|
||||
const statsBrowser = document.getElementById('statisicheBrowser');
|
||||
|
||||
new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Avengers', 'Wall-E', 'Napoleon'],
|
||||
labels: ['Pellegrini', 'Egonu', 'Vio'],
|
||||
datasets: [{
|
||||
label: '# of Votes',
|
||||
data: [<?= $votes["avengers"] ?>, <?= $votes["walle"] ?>, <?= $votes["napoleon"] ?>,],
|
||||
data: [<?= $votes["voto_Pellegrini"] ?>, <?= $votes["voto_Egonu"] ?>, <?= $votes["voto_Vio"] ?>,],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
new Chart(statsPC, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Totti', 'Tamberi', 'Rossi'],
|
||||
datasets: [{
|
||||
label: '# of Votes',
|
||||
data: [<?= $votes["voto_Totti"] ?>, <?= $votes["voto_Tamberi"] ?>, <?= $votes["voto_Rossi"] ?>,],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
new Chart(statsBrowser, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Maschi', 'Femmine'],
|
||||
datasets: [{
|
||||
label: '# of Votes',
|
||||
data: [<?= $_COOKIE["votiMaschili"] ?>, <?= $_COOKIE["votiFemminili"] ?>],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue