changed JS to match 1c49490

This commit is contained in:
Kristjan Komlosi
2020-07-14 11:12:43 +02:00
parent ff13d8eeeb
commit 2136406a28

View File

@@ -16,12 +16,13 @@ function graphSpectralData (obj, dom) {
// graph spectral data in obj into dom
var graphPoints = [];
var graphXTicks = [];
const spectrum = 'ABCDEFGHRISJTUVWKL';
for (var i = 0; i < spectrum.length; i++) {
graphPoints.push([i, obj[spectrum[i]]]);
graphXTicks.push([i, spectrum[i]]);
}
const options = {
grid: { color: 'white' },
xaxis: { ticks: graphXTicks }
@@ -32,8 +33,8 @@ function graphSpectralData (obj, dom) {
function fillTableData (obj) {
// fill the obj data into HTML tables
Object.keys(obj[0])
.forEach((element) => { $('#' + element + '_value').text(obj[0][element]); });
Object.keys(obj[0]).forEach((element) =>
{ $('#' + element + '_value').text(obj[0][element]); });
$('#lx').text(obj[1]);
$('#uva').text(obj[2][0]);
$('#uvb').text(obj[2][1]);