From 1ca2a48262741fce09bb0707db17ea21c2965398 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Fri, 17 Nov 2017 09:57:29 +0100 Subject: [PATCH] Fix: fixed bug displaying data from another source --- static/js/users.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/users.js b/static/js/users.js index a3c854a..878c13c 100644 --- a/static/js/users.js +++ b/static/js/users.js @@ -101,13 +101,13 @@ function updateDateOvertime() { for (item of data) { temp.push([new Date(item[0]*1000), item[1]]); } - data = {label: 'Login overtime', data: temp} + toPlot = [{label: 'Login overtime', data: temp}]; if (!(overtimeWidget === undefined)) { overtimeWidget.setData(toPlot); overtimeWidget.setupGrid(); overtimeWidget.draw(); } else { - overtimeWidget = $.plot('#lineChart', [data], { + overtimeWidget = $.plot('#lineChart', toPlot, { lines: { show: true, steps: true,