2018-11-14 17:50:45 +00:00
|
|
|
<HTML>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
|
2018-11-14 18:08:36 +00:00
|
|
|
<script type="text/javascript" src="./channelsstats.js"></script>
|
2018-11-14 20:55:47 +00:00
|
|
|
<canvas id="byChannel"></canvas>
|
|
|
|
<canvas id="byTsunamy"></canvas>
|
2018-11-15 20:56:19 +00:00
|
|
|
<canvas id="usersByTsunamy"></canvas>
|
2018-11-14 17:50:45 +00:00
|
|
|
<script>
|
2018-11-14 20:55:47 +00:00
|
|
|
var ctx = document.getElementById('byChannel').getContext('2d');
|
2018-11-14 17:50:45 +00:00
|
|
|
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'],
|
2018-11-14 20:55:47 +00:00
|
|
|
datasets: messagesByChannel,
|
2018-11-14 17:50:45 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// Configuration options go here
|
|
|
|
options: {
|
|
|
|
legend: {
|
|
|
|
display: false
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
display: true,
|
2018-11-14 20:55:47 +00:00
|
|
|
text: "Nombre de message par canaux (" + updated +")",
|
2018-11-14 17:50:45 +00:00
|
|
|
position: "bottom"
|
|
|
|
},
|
2018-11-14 20:55:47 +00:00
|
|
|
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,
|
2018-11-14 17:50:45 +00:00
|
|
|
scales: {
|
|
|
|
xAxes: [{
|
|
|
|
stacked: true
|
|
|
|
}],
|
|
|
|
yAxes: [{
|
|
|
|
stacked: true,
|
|
|
|
ticks: {
|
|
|
|
stepSize: 500
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2018-11-15 20:56:19 +00:00
|
|
|
var ctx3 = document.getElementById('usersByTsunamy').getContext('2d');
|
|
|
|
var chart3 = new Chart(ctx3, {
|
|
|
|
// 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: activeUsersByChannel,
|
|
|
|
},
|
|
|
|
|
|
|
|
// Configuration options go here
|
|
|
|
options: {
|
|
|
|
legend: {
|
|
|
|
display: false
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: "Nombre d'utilisateur actifs par canaux (" + updated +")",
|
|
|
|
position: "bottom"
|
|
|
|
},
|
|
|
|
responsive: true,
|
|
|
|
scales: {
|
|
|
|
xAxes: [{
|
|
|
|
stacked: true
|
|
|
|
}],
|
|
|
|
yAxes: [{
|
|
|
|
stacked: true,
|
|
|
|
ticks: {
|
|
|
|
stepSize: 50
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2018-11-14 17:50:45 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</HTML>
|