Lattice Grid Buy a licence

demo D204

Statistical process control: JavaScript Data Grid Demo

Control limits against spec limits, which are not the same thing

type: 'control', y, baseline

This draws a statistical process control chart with control limits set against spec limits, which are not the same thing. It shows when a process is drifting out of its own normal behaviour, distinct from whether it meets the spec, so you catch a change early.

Building…
Loading a live grid…

The configuration

<link rel="stylesheet" href="https://cdn.latticegrid.dev/lattice-grid@1.103.2/lattice-grid.min.css">
<script src="https://cdn.latticegrid.dev/lattice-grid@1.103.2/lattice-grid.min.js"></script>

<div id="chart" style="height: 340px"></div>
<div id="grid" style="height: 320px; margin-top: 14px"></div>

<script type="module">
  import { createChart } from '@toclocoinc/lattice-grid/modules/charts';

  const grid = LatticeGrid.createGrid(document.getElementById('grid'), {
    rowKey: 'id',
    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 } },
    ],
    rows,  // machined bore measurements
  });

  // baseline sets the control limits over the first readings. The chart
  // reads the live grid, so it follows every filter.
  createChart({ grid, container: document.getElementById('chart'), type: 'control', y: 'bore', baseline: 20 });
</script>