1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00

moar graphs

This commit is contained in:
Steffo 2018-11-18 23:04:02 +01:00
parent 56518a1450
commit 21d44db80e

View file

@ -18,7 +18,7 @@
<h1> <h1>
Attività su Discord Attività su Discord
</h1> </h1>
<canvas class="members-graph-7d" id="discord-members-graph-7d"></canvas> <canvas class="graph members-graph-7d" id="discord-members-graph-7d" height="40"></canvas>
<script> <script>
new Chart("discord-members-graph-7d", new Chart("discord-members-graph-7d",
{ {
@ -31,17 +31,26 @@
], ],
"datasets": [ "datasets": [
{ {
"label": "Online", "label": "In cv",
"borderColor": "#6dcff6", "borderColor": "#fe7f00",
"backgroundColor": "#fe7f0022",
"borderWidth": 4,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [ "data": [
{% for point in activityreports %} {% for point in activityreports %}
{{ point.discord_members_online }}, {{ point.discord_members_cv }},
{% endfor %} {% endfor %}
] ]
}, },
{ {
"label": "In game", "label": "In game",
"borderColor": "#9ae915", "borderColor": "#9ae915",
"backgroundColor": "#9ae91511",
"borderWidth": 1,
"borderDash": [2],
"cubicInterpolationMode": "monotone",
"fill": "disabled",
"data": [ "data": [
{% for point in activityreports %} {% for point in activityreports %}
{{ point.discord_members_ingame }}, {{ point.discord_members_ingame }},
@ -49,14 +58,95 @@
] ]
}, },
{ {
"label": "In cv", "label": "Online",
"borderColor": "#fe7f00", "borderColor": "#6dcff6",
"backgroundColor": "#6dcff611",
"borderWidth": 1,
"cubicInterpolationMode": "monotone",
"fill": 0,
"data": [
{% for point in activityreports %}
{{ point.discord_members_online }},
{% endfor %}
]
}
]
},
"options":{
}
});
</script>
<canvas class="graph cv-graph-7d" id="discord-cv-graph-7d" height="40"></canvas>
<script>
new Chart("discord-cv-graph-7d",
{
"type": "line",
"data": {
"labels": [
{% for point in activityreports %}
"{{ point.timestamp.strftime("%a %H:%M") }}",
{% endfor %}
],
"datasets": [
{
"label": "Membri in cv",
"borderColor": "#a0ccff",
"backgroundColor": "#a0ccff22",
"borderWidth": 4,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [ "data": [
{% for point in activityreports %} {% for point in activityreports %}
{{ point.discord_members_cv }}, {{ point.discord_members_cv }},
{% endfor %} {% endfor %}
] ]
}, },
{
"label": "Utenti in cv",
"borderColor": "#ffff00",
"backgroundColor": "#ffff0011",
"borderWidth": 2,
"cubicInterpolationMode": "monotone",
"fill": 0,
"data": [
{% for point in activityreports %}
{{ point.discord_cv }},
{% endfor %}
]
},
]
},
"options":{
}
});
</script>
<canvas class="graph channels-graph-7d" id="discord-channels-graph-7d" height="40"></canvas>
<script>
new Chart("discord-channels-graph-7d",
{
"type": "line",
"data": {
"labels": [
{% for point in activityreports %}
"{{ point.timestamp.strftime("%a %H:%M") }}",
{% endfor %}
],
"datasets": [
{
"label": "Canali utilizzati",
"borderColor": "#ff0000",
"backgroundColor": "#ff000022",
"borderWidth": 2,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [
{% for point in activityreports %}
{{ point.discord_channels_used }},
{% endfor %}
]
}
] ]
}, },
"options":{ "options":{