demo D212
Manufacturing and process in React
A machined bore with a tolerance driving capability, drifting in one shift
spec · grid.statistics.capability
This is a machined-bore dataset with a tolerance driving a capability figure, and the process drifting within a single shift. It shows manufacturing data judged against its spec in real time, so a drift out of tolerance shows as it happens.
This is the React version. The grid mounts through the createLatticeGrid adapter, which takes its configuration as ordinary props and hands back the live grid through a ref. The grid below is the same one every other tab runs.
The configuration
<link rel="stylesheet" href="https://cdn.latticegrid.dev/lattice-grid@1.108.0/lattice-grid.min.css">
<div id="grid"></div>
<script type="module">
import React from 'https://esm.sh/react@18';
import { createRoot } from 'https://esm.sh/react-dom@18/client';
import { createGrid } from 'https://cdn.latticegrid.dev/lattice-grid@1.108.0/lattice-grid.esm.min.js';
import createLatticeGrid from 'https://cdn.latticegrid.dev/lattice-grid@1.108.0/modules/react.esm.min.js';
const LatticeGrid = createLatticeGrid({ React, createGrid });
const columns = [
{ field: 'part', title: 'Part', layout: { pin: 'start', width: 120 } },
{ field: 'shift', title: 'Shift', filter: { type: 'set' } },
// The spec drives process capability and the control chart.
{ field: 'bore', title: 'Bore', type: 'millimetres', total: 'median',
spec: { lower: 9.5, upper: 10.8, target: 10 } },
{ field: 'speed', title: 'Spindle', type: 'rpm', total: 'avg' },
{ field: 'line', title: 'Line pressure', type: 'bar', total: 'p95' },
{ field: 'torque', title: 'Torque', type: 'torque', total: 'max' },
];
const rows = [/* measured parts */];
function App() {
return (
<LatticeGrid
rowKey="id"
toolPanel={{ side: 'left', panels: ['columns', 'filters', 'statistics'] }}
columnDefaults={{ filter: true }}
columns={columns}
rows={rows}
style={{ height: '460px' }}
/>
);
}
createRoot(document.getElementById('grid')).render(<App />);
</script>