Skip to content
Snippets Groups Projects
Commit a63a1e16 authored by Benedikt's avatar Benedikt
Browse files

added uncers to table in 2D view

parent 44431452
Branches
No related tags found
No related merge requests found
Pipeline #51335 passed
......@@ -262,20 +262,21 @@
Plotly.newPlot(plotId, plotData, layout);
// Generate an HTML table for the measurement data.
// Generate an HTML table for the measurement data with index uncertainties.
let tableHTML = '<table><thead><tr><th>Index1 \\ Index2</th>';
for (let j = 0; j < numCols; j++) {
tableHTML += `<th>${index2Array[j]} ${index2Unit}</th>`;
tableHTML += `<th>${index2Array[j]} ± ${index2UncArray[j]} ${index2Unit}</th>`;
}
tableHTML += '</tr></thead><tbody>';
for (let i = 0; i < numRows; i++) {
tableHTML += `<tr><th>${index1Array[i]} ${index1Unit}</th>`;
tableHTML += `<tr><th>${index1Array[i]} ± ${index1UncArray[i]} ${index1Unit}</th>`;
for (let j = 0; j < numCols; j++) {
tableHTML += `<td>${dataMatrix[i][j]}<br>&plusmn;${dataUncMatrix[i][j]}</td>`;
}
tableHTML += '</tr>';
}
tableHTML += '</tbody></table>';
tableDiv.innerHTML = tableHTML;
tableDiv.innerHTML = tableHTML;
} // end for-each table
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment