From e4dda5b30872f9b8ac80cbf6a54d266d534c3571 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Jan 2021 09:41:25 +0100 Subject: [PATCH] cleanup code --- static/scripts/chartfull.js | 36 +++--------------------------------- static/scripts/refull.js | 2 -- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/static/scripts/chartfull.js b/static/scripts/chartfull.js index c054d43..5804634 100644 --- a/static/scripts/chartfull.js +++ b/static/scripts/chartfull.js @@ -1,27 +1,3 @@ -/*var tcpServertimesSpeedsPos = { - data: [ - { - dataset: { - times: [], - speeds: [], - positions: [] - } - } - ] -} - -var serialServertimesSpeedsPos = { - data: [ - { - dataset: { - times: [], - speeds: [], - positions: [] - } - } - ] -}*/ - let allSpeedsSerial = [] let indexes = [] @@ -75,8 +51,6 @@ var myChart = new Chart(ctx, { } } }); -//myChart.data.labels.fill("", 0, GRAPH_RES); -//myChart.data.datasets.forEach((dataset) => dataset.data.fill(0, 0, GRAPH_RES)) function addSerialSpeedData() { let speeds = [] @@ -86,7 +60,7 @@ function addSerialSpeedData() { }) myChart.data.datasets[0].data = speeds; myChart.update(); -}; +} function addTCPSpeedData(sensordataList) { let speedsTCP = [] @@ -105,12 +79,8 @@ function addTCPSpeedData(sensordataList) { myChart.data.labels = times; myChart.data.datasets[1].data = speedsTCP; - /*while (myChart.data.labels.length >= GRAPH_RES) { - myChart.data.labels.shift(); - myChart.data.datasets.forEach((dataset) => dataset.data.shift()) - }*/ myChart.update(); -}; +} function findSerialDataIndex(tcpdataList, serialdataList) { let allSerialTimes = [] @@ -133,4 +103,4 @@ function findSerialDataIndex(tcpdataList, serialdataList) { } }) console.log("indexes: " + indexes) -}; \ No newline at end of file +} \ No newline at end of file diff --git a/static/scripts/refull.js b/static/scripts/refull.js index 314a1c4..2e4337c 100644 --- a/static/scripts/refull.js +++ b/static/scripts/refull.js @@ -71,7 +71,5 @@ window.addEventListener("load", function(evt) { }) } - - });