Lattice Grid Buy a licence

demo D188

Rules that describe the data

The outliers, found in the data, beside a threshold you typed

when: { op: 'outlier' }

Building…
Loading a live grid…

The configuration

<script>
  import { createGrid } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.28.0/lattice-grid.esm.min.js';
  import createLatticeAction from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.28.0/modules/svelte.esm.min.js';

  const lattice = createLatticeAction({ createGrid });

  const config = {
    rowKey: 'id',
    columnDefaults: { filter: true },
    // Two columns of the same field: a threshold you type, and a rule that
    // finds the outliers in the data itself.
    formatting: {
      charge: [{ when: { op: 'gt', value: 3000 }, style: { background: '#fff4e5' } }],
      'charge-outlier': [{ when: { op: 'outlier' }, style: { background: '#fbeceb' } }],
    },
    columns: [
      { field: 'circuit', title: 'Circuit', layout: { pin: 'start', width: 180 } },
      { field: 'region', title: 'Region', filter: { type: 'set' } },
      { field: 'charge', title: 'Charge · gt 3000', type: 'number' },
      { field: 'charge', id: 'charge-outlier', title: 'Charge · outlier', type: 'number' },
    ],
    rows,  // circuit records
  };
</script>

<svelte:head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.28.0/lattice-grid.min.css">
</svelte:head>

<div use:lattice={config} style="height: 500px"></div>