From a3f3558f7c4fa27dd622979c11a97eafe42ccfaa Mon Sep 17 00:00:00 2001 From: Kristjan Komlosi Date: Fri, 14 Feb 2020 14:18:38 +0100 Subject: [PATCH] fixed wavelength order in spectrogram --- frontend/frontend.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/frontend.js b/frontend/frontend.js index d3b422c..d4ad926 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -22,11 +22,11 @@ function graphSpectralData (obj, dom) { var graphPoints = []; var graphXTicks = []; - Object.keys(obj).forEach((element, index) => { - graphPoints.push([index, obj[element]]); // build array of points - graphXTicks.push([index, element]); // build array of axis labels - }); - // console.log(graphPoints); + const specter = 'ABCDEFGHRISJTUVWKL'; + for (var i = 0; i < specter.length; i++) { + graphPoints.push([i, obj[specter[i]]]); + graphXTicks.push([i, specter[i]]); + } const options = { grid: {color: 'white'}, xaxis: {ticks: graphXTicks}