Commit 2800ade0 authored by Jasin's avatar Jasin

closed #1

parent 1b7c4b14
......@@ -194,15 +194,15 @@
</section>
<!-- About Section -->
<section class="bg-primary text-white mb-0" id="stats">
<section class="text-white mb-0" id="stats">
<div class="container">
<h2 class="text-center text-uppercase text-white">Statistik</h2>
<hr class="star-light mb-5">
<h2 class="text-center text-uppercase text-secondary">Statistik</h2>
<hr class="star-dark mb-5">
<div class="row">
<canvas class="mainChart" id="myChart"></canvas>
</div>
<div class="text-center mt-4">
<a class="btn btn-xl btn-outline-light" href="https://rnv-monitor.de/public/stats">
<a class="btn btn-xl btn-primary" href="https://rnv-monitor.de/public/stats">
<i class="far fa-chart-bar mr-2"></i>
Statistik zu Ihrer Verbindung
</a>
......
......@@ -3,7 +3,7 @@ var myChart;
function addDataSet(delays, name)
{
console.log("Add Dataset");
let color = "##18bc9c;";
let color = "rgba(24, 188, 156, 1)";
let Dataset =
{
......@@ -58,21 +58,17 @@ function statsDataLoader()
response = JSON.parse(response);
console.log(response);
let dataDelays = [];
let labels = [];
for(let i = 0; i < response.length; i++)
{
dataDelays.push(response[i].delays);
labels.push(response[i].created);
}
let labels = [];
for(let e = 0; e < amount; e++)
{
labels.push(response[e].created);
}
chartConfig.data.labels = labels;
initChart(chartConfig);
addDataSet(dataDelays, lineLabel);
addDataSet(dataDelays, "Versptäung in Minuten");
});
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment