crazy-toads.github.io/statpages/channelsstats.html
2018-11-14 21:55:47 +01:00

79 lines
No EOL
2.3 KiB
HTML

<HTML>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
<script type="text/javascript" src="./channelsstats.js"></script>
<canvas id="byChannel"></canvas>
<canvas id="byTsunamy"></canvas>
<script>
var ctx = document.getElementById('byChannel').getContext('2d');
var chart = new Chart(ctx, {
// The type of chart we want to create
type: 'bar',
// The data for our dataset
data: {
labels: ['Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre'],
datasets: messagesByChannel,
},
// Configuration options go here
options: {
legend: {
display: false
},
title: {
display: true,
text: "Nombre de message par canaux (" + updated +")",
position: "bottom"
},
responsive: true,
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true,
ticks: {
stepSize: 500
}
}]
}
}
});
var ctx2 = document.getElementById('byTsunamy').getContext('2d');
var chart2 = new Chart(ctx2, {
// The type of chart we want to create
type: 'bar',
// The data for our dataset
data: {
labels: ['Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre'],
datasets: messagesByTsunami,
},
// Configuration options go here
options: {
legend: {
display: false
},
title: {
display: true,
text: "Nombre de message par Tsunami (" + updated +")",
position: "bottom"
},
responsive: true,
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true,
ticks: {
stepSize: 500
}
}]
}
}
});
</script>
</HTML>