Lattice Grid Buy a licence

demo D230

An SPC study: control, range, capability

A drifting process with limits fixed on the first thirty readings, so the drift breaks a rule rather than being absorbed

chart type: control · movingRange · capability

Building…
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="control" style="height:220px"></div>
<div style="display:flex;gap:12px;margin-top:12px">
  <div id="mr" style="flex:1;height:200px"></div>
  <div id="cap" style="flex:1;height:200px"></div>
</div>
<div id="grid" style="height:320px;margin-top:12px"></div>

<script type="module">
  import { createGrid } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0';
  import { createChart } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/modules/charts';

  const grid = createGrid(document.getElementById('grid'), {
    rowKey: 'id',
    columns: [
      { field: 'n', title: '#', type: 'number' },
      // The tolerance is declared once, on the column; every SPC figure reads it.
      { field: 'bore', title: 'Bore', type: 'millimetres', spec: { lower: 9.95, upper: 10.05, target: 10 } },
    ],
    rows,  // measured parts, in the order they were made
  });

  // baseline fixes the limits on the first 30 readings, so a later drift breaks a
  // rule rather than widening the limits to absorb it.
  createChart({ grid, container: '#control', type: 'control',     y: 'bore', baseline: 30, rules: 'nelson' });
  createChart({ grid, container: '#mr',      type: 'movingRange', y: 'bore' });
  createChart({ grid, container: '#cap',     type: 'capability',  y: 'bore' });

  // The capability index against the declared tolerance, with the rule set applied.
  const c = grid.statistics.capability('bore', { rules: 'nelson', baseline: 30 });
  console.log(c.cpk, c.violations);
</script>