demo D211
Analytical chemistry
Molarity, ppb and dose types, with a contaminated batch the rules find
type: molarity · ppb · doseRate
Loading a live grid…
The configuration
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.css">
<script src="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.js"></script>
<div id="grid" style="height: 460px"></div>
<script>
const grid = LatticeGrid.createGrid(document.getElementById('grid'), {
rowKey: 'id',
toolPanel: { side: 'left', panels: ['columns', 'filters', 'statistics'] },
columnDefaults: { filter: true },
columns: [
{ field: 'sample', title: 'Sample', layout: { pin: 'start', width: 120 } },
{ field: 'batch', title: 'Batch', filter: { type: 'set' } },
{ field: 'concentration', title: 'Concentration', type: 'molarity', total: 'median' },
{ field: 'contaminant', title: 'Contaminant', type: 'ppb', total: 'p95' },
{ field: 'temperature', title: 'Temp', type: 'celsius', total: 'avg' },
{ field: 'doseRate', title: 'Dose rate', type: 'doseRate', total: 'max' },
],
formatting: {
// A rule that describes the data, not a threshold you typed.
contaminant: [{ when: { op: 'zAbove', value: 3 }, style: { background: '#fbeceb' } }],
},
rows,
});
</script>