Lattice Grid Buy a licence

demo D188

Rules that describe the data in Angular

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

when: { op: 'outlier' }

This grid highlights the outliers found in the data itself, shown beside a fixed threshold you typed, so you can compare the two. It lets a rule describe the shape of the data rather than a hard-coded cutoff, so unusual values surface even when you did not know the number in advance.

Building…
Loading a live grid…

This is the Angular version. A standalone component takes the whole configuration through one config input, surfaces grid events as outputs, and exposes the live grid on a getter for anything the inputs do not cover.

The configuration

import { Component } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { createGrid } from '@toclocoinc/lattice-grid';
import '@toclocoinc/lattice-grid/css';
import { LatticeGridComponent, provideLattice } from '@toclocoinc/lattice-grid/angular';

// Two columns of the same field: a threshold you type, and a rule that finds
// the outliers in the data itself.
const formatting = {
  charge: [{ when: { op: 'gt', value: 3000 }, style: { background: '#fff4e5' } }],
  'charge-outlier': [{ when: { op: 'outlier' }, style: { background: '#fbeceb' } }],
};

const 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' },
];

const rows = [/* circuit records */];



@Component({
  selector: 'app-root',
  standalone: true,
  imports: [LatticeGridComponent],
  template: '<lattice-grid [config]="grid" style="display:block;height:500px"></lattice-grid>',
})
export class AppComponent {
  grid = {
    rowKey: 'id',
    columnDefaults: { filter: true },
    formatting: formatting,
    columns: columns,
    rows: rows,
  };
}

bootstrapApplication(AppComponent, {
  providers: [provideLattice({ createGrid })],
});