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