crazy-toads.github.io/pages/channelsstats.md

133 lines
3.7 KiB
Markdown
Raw Normal View History

2018-12-02 18:01:54 +00:00
---
layout: page
2018-12-02 18:22:28 +00:00
permalink: /channelsstats/
2018-12-02 18:24:34 +00:00
title: Statistiques du Chat
linktitle: "Statistiques du Chat"
2018-12-02 18:01:54 +00:00
linkurl: /channelsstats/
2018-12-02 18:14:20 +00:00
description: "Statistiques sur le chat https://coa.crapaud-fou.org"
chartjs: true
jquery: true
2018-12-02 18:01:54 +00:00
---
Statistiques du <a href="https://coa.crapaud-fou.org">chat</a> (aussi connu sous le nom de mare aux crapauds) :
2018-11-14 20:55:47 +00:00
<canvas id="byChannel"></canvas>
<canvas id="byTsunamy"></canvas>
2019-06-08 11:37:34 +00:00
<canvas id="usersByChannel"></canvas>
<script>
2019-06-08 20:08:21 +00:00
updated = "updated 02/05/2019"
labels = ["mai 2018","juin 2018","juillet 2018","août 2018","septembre 2018","octobre 2018","novembre 2018","décembre 2018","janvier 2019","février 2019","mars 2019","avril 2019"];
2018-12-02 18:01:54 +00:00
$.getJSON("{{ site.baseurl }}/public/data/messagesByChannel.json", function (datas){
2018-11-14 20:55:47 +00:00
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: {
2018-12-02 18:01:54 +00:00
labels: labels,
datasets: datas,
},
// Configuration options go here
options: {
legend: {
display: false
},
title: {
display: true,
2018-12-02 18:01:54 +00:00
text: "Nombre de message par canaux (" + updated + ")",
2018-12-02 18:50:59 +00:00
position: "top"
},
2018-11-14 20:55:47 +00:00
responsive: true,
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true,
ticks: {
stepSize: 500
}
}]
}
}
});
});
2019-06-08 11:37:34 +00:00
$.getJSON("{{ site.baseurl }}/public/data/messagesByTsunami.json", function (datas){
2018-11-14 20:55:47 +00:00
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: {
2018-12-02 18:01:54 +00:00
labels: labels,
datasets: datas,
2018-11-14 20:55:47 +00:00
},
// Configuration options go here
options: {
legend: {
display: false
},
title: {
display: true,
2018-12-02 18:01:54 +00:00
text: "Nombre de message par Tsunami (" + updated + ")",
2018-12-02 18:50:59 +00:00
position: "top"
2018-11-14 20:55:47 +00:00
},
responsive: true,
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true,
ticks: {
stepSize: 500
}
}]
}
}
});
});
2019-06-08 11:37:34 +00:00
$.getJSON("{{ site.baseurl }}/public/data/activeUsersByChannel.json", function (datas){
var ctx3 = document.getElementById('usersByChannel').getContext('2d');
var chart3 = new Chart(ctx3, {
// The type of chart we want to create
type: 'bar',
// The data for our dataset
data: {
2018-12-02 18:01:54 +00:00
labels: labels,
2019-06-08 11:37:34 +00:00
datasets: datas,
},
// Configuration options go here
options: {
legend: {
display: false
},
title: {
display: true,
2018-12-02 18:01:54 +00:00
text: "Nombre d'utilisateur actifs par canaux (" + updated + ")",
2018-12-02 18:50:59 +00:00
position: "top"
},
responsive: true,
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true,
ticks: {
stepSize: 50
}
}]
}
}
});
2019-06-08 11:37:34 +00:00
});
2018-12-02 18:01:54 +00:00
</script>