demo D204
Statistical process control
Control limits against spec limits, which are not the same thing
type: 'control', y, baseline
Loading a live grid…
The configuration
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.27.0/lattice-grid.min.css">
<script type="module">
import { defineLatticeGrid } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.27.0/modules/webcomponent.esm.js';
defineLatticeGrid();
</script>
<div id="chart" style="height: 340px"></div>
<lattice-grid row-key="id" style="display: block; height: 320px; margin-top: 14px"></lattice-grid>
<script type="module">
import { createChart } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.27.0/modules/charts.esm.min.js';
const el = document.querySelector('lattice-grid');
el.config = {
columns: [
{ field: 'part', title: 'Part', layout: { width: 110 } },
// The spec declares the tolerance; the control chart reads it.
{ field: 'bore', title: 'Bore', type: 'number',
spec: { lower: 9.5, upper: 10.8, target: 10 } },
],
};
el.rows = rows; // machined bore measurements
// baseline sets the control limits over the first readings. The chart reads
// el.grid, the live grid inside the element, so it follows the table.
createChart({ grid: el.grid, container: '#chart', type: 'control', y: 'bore', baseline: 20 });
</script>