Lattice Grid Buy a licence

demo D179

Statistics in the totals row

Median, percentiles, deviation and spread, each over the filtered rows

total: 'median' · 'p95' · 'stddev'

Building…
Loading a live grid…

The configuration

import * as ng from '@angular/core';
import { Component } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { createGrid } from '@toclocoinc/lattice-grid';
import '@toclocoinc/lattice-grid/css';
import createLatticeGrid from '@toclocoinc/lattice-grid/modules/angular';

const { LatticeGridComponent } = createLatticeGrid({ ng, createGrid });

const columns = [
  { field: 'reference', title: 'Reference', layout: { pin: 'start', width: 150 } },
  { field: 'desk', title: 'Desk', filter: { type: 'set' } },
  // Each column names its own reduction: median, 95th percentile, deviation.
  { field: 'price', title: 'Price', type: 'number', total: 'median' },
  { field: 'bid', title: 'Bid', type: 'number', total: 'p95' },
  { field: 'volume', title: 'Volume', type: 'number', total: 'iqr' },
  { field: 'notional', title: 'Notional', type: 'number', total: 'sum' },
];

const rows = [/* trading book records */];



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

bootstrapApplication(AppComponent);