parse spectra to float
This commit is contained in:
parent
092c547fff
commit
47955ec572
@ -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) {
|
||||
|
Reference in New Issue
Block a user