Lattice Grid Buy a licence

demo D204

Statistical process control

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

type: 'control', y, baseline

Building…
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">
<style>
  #chart { height: 340px; }
  #grid { margin-top: 14px; }
  #grid > div { height: 320px; }
</style>
<div id="app"></div>

<script type="module">
  import * as Vue from 'https://esm.sh/vue@3';
  import { createGrid } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.27.0/lattice-grid.esm.min.js';
  import createLatticeGrid from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.27.0/modules/vue.esm.min.js';
  import { createChart } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.27.0/modules/charts.esm.min.js';

  const LatticeGrid = createLatticeGrid({ vue: Vue, createGrid });

  Vue.createApp({
    components: { LatticeGrid },
    data() {
      return {
        config: {
          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
        },
      };
    },
    mounted() {
      // The component exposes the live grid via a template ref. baseline sets
      // the control limits over the first readings.
      const grid = this.$refs.grid.grid();
      createChart({ grid, container: '#chart', type: 'control', y: 'bore', baseline: 20 });
    },
    template: `
      <div id="chart"></div>
      <div id="grid"><lattice-grid ref="grid" v-bind="config" /></div>
    `,
  }).mount('#app');
</script>