From de47450381911e835da5152b807c2cc3adeb75f5 Mon Sep 17 00:00:00 2001 From: Kristjan Komlosi Date: Fri, 1 Nov 2019 21:32:55 +0100 Subject: [PATCH] fixed passing arguments to flot, see comment --- frontend/frontend.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/frontend.js b/frontend/frontend.js index 45b6271..3c84846 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -21,7 +21,8 @@ function graphSpectralData (obj, dom) { graphPoints.push([index, obj[element]]); }); console.log(graphPoints); - $.plot("#graph", graphPoints); + $.plot('#graph', [graphPoints]); + // flot expects an array of arrays (lines) of 2-element arrays (points) } function fillLuxUv (obj, dom) {