From 47955ec5728c1f21ab370cfd167061fa7f429a5c Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Fri, 21 Aug 2020 11:23:36 +0200 Subject: [PATCH] parse spectra to float --- src/helpers/flatten.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/flatten.ts b/src/helpers/flatten.ts index deb3af9..ed54da9 100644 --- a/src/helpers/flatten.ts +++ b/src/helpers/flatten.ts @@ -7,8 +7,8 @@ export default function flatten (data, keepArray = false) { // flatten object: result[prop] = cur; } else if (prop === `${globals.spectrum.spectrum}.${globals.spectrum.dpt}`) { - result[prop + '.labels'] = cur.map(e => e[0]); - result[prop + '.values'] = cur.map(e => e[1]); + result[prop + '.labels'] = cur.map(e => parseFloat(e[0])); + result[prop + '.values'] = cur.map(e => parseFloat(e[1])); } else if (Array.isArray(cur)) { if (keepArray) {