the grid · v1.133.1
The JavaScript Data Grid Engine
The JavaScript data grid that does the analysis, and every view you build on it.
Lattice Grid is a fast, editable JavaScript data grid that also works out the answer: derived grids, statistics computed from the live rows, and a feed routed to every view you build on it. It holds data in columns and virtualises both axes, so a million rows scroll at the frame rate. Vanilla JavaScript, no framework required.
Try it live Start free on localhost
the analysis, on real rows
A footer that reads the median, not just the sum.
Twenty thousand generated trading positions. Each column names its own reduction in the footer: a median price, a 95th-percentile bid, the deviation of the day's change, the spread of volume and a sum. Filter to one desk and every figure narrows with it. The rows are generated in your browser, so nothing is sent anywhere.
what it does
The analysis is part of the grid, not an add-on.
Derived grids
A grid whose rows are computed from another grid: filter, roll up, pivot and join, then chain another on top. Filter the source and every derived grid recomputes over what is left.
Statistics
Column profiles, correlations between columns, and one grid compared with another, all computed from the live rows and following the filters.
Compare groups
Tick two or more services and read which test the grid chose and why, the p-value, the interval on the difference, the effect size and a one-sentence verdict.
Explain a number
Open Explain on a total to see what it is made of, ranked with each share, then compare two states and read the drivers of the change.
Clustering
A cluster column gives every row a segment you can group, colour on a scatter and read the centres and sizes of. Filter the grid and the segments are found again over what is left.
Data Router
One live feed routed to many views, so a grid, a chart and a board read the same rows without a second copy.
AI narrative
Bring your own model and have it describe the result in plain words, from the rows the grid is showing.
And the grid itself
grouping, totals and pivot
From rows to the few numbers someone asked for.
Group by one column or several and the grid folds the rows into each group, showing the total you asked for and opening to the real rows underneath. The reductions run over the data, not the page, so a total is the total whether or not its rows are on screen. Or pivot, and the distinct values of a field become columns of their own. See how to add a grand total row to a data grid for a runnable example that sums one column and averages another beneath a filter box.
tree data and master-detail
Hierarchies, and the detail underneath a row.
A row can open into a nested grid of its own, line items under an order, trades under a book, and a column can carry a tree the grid expands lazily as branches are opened. The detail is a full instance of the grid, so the same types, editors and validators apply three levels down as they do at the top.
a type per column
A type is not a label.
A column's type is its storage, its comparator, its parser, its formatter and its editor, all
declared in one line. A number sorts and right-aligns numerically;
a date compares by calendar rather than by string; a
duration, a bytes or an
ipv4 stores one value and renders it the way a person reads it.
Nothing here is inferred row by row. And there are 88 of them registered,
from currency and percentages to IP addresses, molarity and a dozen unit families, before you
write one of your own.
Every type → The built-in types → A unit family of your own → A type of your own →
sources and live data
In-memory, paged, remote or streaming.
The same grid reads from an array in the page, a server that pages and filters on its own, or a stream that mints rows as they arrive. Updates are coalesced onto a frame, so a feed of thousands of changes a second is one repaint per frame rather than one per message, and the rate below is what your browser actually applied, measured as it runs.
One million rows → Sort at scale → Two hundred columns → Pivot → Grouping → Master & detail → Tree data → Twenty thousand cell updates → Streaming source →
accessibility
Keyboard and screen-reader users get a first-class grid.
Every operation is reachable without a pointer, and a screen reader hears where a user stands in the whole dataset rather than in the handful of rows on screen. We have been steadily closing conformance gaps against WCAG 2.2 level AA, and this is where several of them land. Menu and filter controls now report whether their popup is open or closed, so a non-visual user always knows the state of what they just pressed, and the filter dialog announces itself as a dialog, so focus and reading order behave the way that pattern should. The grid's own buttons, its tool panel and the names read aloud all draw from the same message catalogue as the rest of your interface, so a grid you translate speaks your language to a screen reader too, and a cell renderer of your own can pull its labels from that catalogue through a typed hook instead of writing English in by hand. The checks that run alongside a live grid now include an accessibility pass, so a missing name or a role that has drifted shows up while you build. This is ongoing work rather than a finished conformance claim.
Keyboard throughout → Screen readers → High contrast → Reduced motion →
Complete, and framework-free
Sorting, filtering, grouping, editing and export are already in the box, so you ship the screen instead of building the grid. Mount it on a div in React, Vue, Svelte or plain HTML, with no build step and the TypeScript types alongside, and it behaves the same everywhere.
Not a viewer. A workspace.
Reading data is the easy half. Editing is where a demo becomes a product: type, fill, paste from Excel and undo the lot, with every write checked before it lands and rolled back if the server says no.
Rows in, answers out
Point charts at the grid and they draw straight from its live rows. Open the statistics layer and it tells you what the numbers say, and how far they have moved since you last looked.
getting started
Get up and running in about a minute
Drop one stylesheet and one script from a CDN into your page, point it at a div with a height, describe your columns. Columns group their settings by concern, so a column definition reads as a description of the column rather than a list of forty flat properties.
That is the whole file. There is no build step, no configuration file and nothing to
register at start-up, and the grid takes no runtime dependencies of its own. If you would
rather install it, the same build is on npm as
@toclocoinc/lattice-grid, and the type declarations travel
with it.
Using Lattice Grid, free or licensed, means accepting the licence terms.
Everything below is already on, without asking for it:
- Sorting, including shift-click for a second key
- A filter on every column, matched to what the column holds
- Resizing, reordering and hiding, by dragging the heading
- Keyboard navigation, with the grid as one tab stop
Development on localhost needs no licence key, so you can build the real screen against real data before deciding anything. A personal or other non-commercial project does not need to buy one either: an individual can get the non-commercial key, six months for one domain, by email, and renew it for as long as the project stays non-commercial.
<!-- one stylesheet and one script, straight from a CDN -->
<link rel="stylesheet" href="https://cdn.latticegrid.dev/lattice-grid@1.133.1/lattice-grid.min.css">
<script src="https://cdn.latticegrid.dev/lattice-grid@1.133.1/lattice-grid.min.js"></script>
// then, on your own page, no build step:
const rows = [
{ id: 1, circuit: 'ETH-LON-100001', region: 'London',
status: 'live', bandwidth: 1000, charge: 465.32 },
// ...one object per row
];
const grid = LatticeGrid.createGrid(el, {
rows,
rowKey: 'id',
selection: 'multiple',
columns: [
{ field: 'circuit', title: 'Circuit',
layout: { pin: 'start', width: 190 } },
{ field: 'region', title: 'Region',
group: true, filter: { type: 'set' } },
{ field: 'status', title: 'Status',
filter: { type: 'set' } },
{ field: 'bandwidth', title: 'Bandwidth',
type: 'number', format: { style: 'decimal' },
filter: { type: 'number' } },
{ field: 'charge', title: 'Monthly charge',
type: 'number',
format: { style: 'currency', currency: 'GBP' },
total: 'sum',
filter: { type: 'number' } }
]
});
not a read-only viewer
Made to be edited, not just read.
A read-only grid shows the data. This one changes it. Editing is not a paid add-on or a second component wrapped around the table: inline edits, drag-to-fill, paste straight from Excel, edits across a whole selection at once, validation that refuses a bad value before it lands, and one undo stack over all of it, standard in the box. The same section covers the live tools that go with working in a grid rather than reading one: redact a column before a screen share, draw over it to make a point, and throw it full screen. Double-click a cell below and type, or send the grid full screen and watch it mark up a couple of cells for you.
-
Inline editing
Double-click, a keystroke, or Enter opens the editor over the cell. Tab and Enter commit and move on, Escape restores what was there.
-
Fill handle
Drag the corner of a selection to extend a series: repeat a value, continue 1, 2, 3, or advance a run of dates, the way a spreadsheet user expects.
-
Copy and paste
Tab-separated on the way out and back in, so a range copies into Excel or Sheets as real columns and a block pastes back through each column's parser.
-
Bulk edits
Apply one value across a whole selected range in a single write, and reverse all of it with one undo rather than one per cell touched.
-
Validation
A per-column rule refuses a bad value on commit: the editor stays open, the cell shows why, and the value never reaches the row.
-
Undo and redo
One history stack over every kind of write. A typed cell, a fill and a paste each land as one entry, so undo reverses the gesture, not the cells.
-
Row editing
Edit the whole row at once and commit it as a unit, for the workflow where a record is corrected field by field before it is saved.
-
Editor gallery
Twenty-two editors, from number steppers and date pickers to sliders, colour swatches and a code editor, each wired to the column type it belongs to.
-
Redaction
Mask a column before a screen share. The row count, the sort and the filters stay readable; only the values it holds go dark, and one click brings them back.
-
Annotations
Draw over the grid to mark a column, circle an outlier or underline a total. Marks are held in content coordinates, so they travel with the cells as you scroll.
-
Full screen
Fill the window with the grid and come back to the same scroll position and the same selection, one key each way. The grid below marks up a couple of cells when it goes full screen.
typed to the column
Engineering data, parsed into real types.
Point a column at a built-in type and it parses what a person types rather than storing the
text of it. Here every column on a bench of lab instruments is a different type:
1.5 TB becomes a byte count, 3h 20m
becomes a duration, 10.0.0.42 becomes a 32-bit address, a
subsystem code becomes its label. Each one then sorts, filters, totals and exports on the
parsed value, not on the string on screen. Double-click a cell and try one.
-
Built-in types
One
typeper column decides its comparator, its alignment, the filter it offers and the editor it opens, from a single declared line. -
Units
A column that means bytes, metres or bits per second accepts
1.5 GBor40 km, stores one base value, and renders each row in the unit that reads best. -
Durations
Elapsed time stored as a number and shown as
3h 12m, so a duration column sorts by true length rather than alphabetically. -
Numbers and currency
Grouping, fixed decimals, currency symbols and parenthesised negatives, applied at render only, with the underlying number left untouched for sorting.
-
IP addresses
An
ipv4column stores a 32-bit integer, so addresses sort in true numeric order and cross 128.0.0.0 correctly rather than lexically. -
Dates and zones
One instant, formatted per column against a named time zone, while sorting and filtering compare the underlying moment across every zone shown.
-
Hex, binary and octal
One integer read in more than one base at once. Editing any base parses in that base and writes back the same number, so the others re-render.
-
JSON values
A nested object held whole in a cell, with individual leaves lifted into real sortable, filterable columns beside it.
for the people who live in it
The screen they use all day.
Most of what an operations team asks a grid for has nothing to do with rendering rows. It is the small things around the data: getting it on a projector, sharing a screen without showing a salary, coming back to the view they had yesterday. All of this ships in the box, so nobody has to build it twice.
Reviewing the numbers happens on the same screen the numbers live on. A thread hangs off a cell with the questions still open counted next to it, and anyone can draw straight onto the grid to point at the row under discussion.
-
Presentation mode
Scale the whole grid up for a room, step through saved views like slides, and spotlight the rows you are talking about. The data stays live and interactive throughout.
-
Saved views
Name a set of columns, filters, sorting and grouping, and switch between them. The view someone built on Monday is still there on Friday.
-
Cell comments
Threaded discussion attached to a cell, with an unresolved count, so reviewing data happens in the grid rather than in a separate thread nobody can find.
-
Four themes
Light, dark, high contrast and terminal, switched live. High contrast is built to the WCAG boundary rules rather than being dark with the brightness turned up.
-
Excel export
A styled workbook with number formats and frozen panes, written by the grid itself. No server round trip, and no extra dependency in your bundle.
-
Keyboard throughout
The grid is one tab stop, so it never traps anyone. Arrows, page keys and Enter do what a person coming from a spreadsheet expects.
nothing fails silently
A wrong setting tells you it is wrong.
Hand the grid a value it cannot use and it no longer falls back without a word. It names the setting, says what it expected, shows the value it got, and keeps rendering on the safe default. A mistyped option or a value pasted from the wrong place surfaces while you build it, not weeks later when someone asks why a colour never took. A value the grid understands stays silent, so a warning is always worth reading.
answers, not just rows
The grid that shows you what the data says.
A table hands you the numbers and leaves the reading to you. This one does the reading too: it draws from its own data, tells you what the figures mean, and remembers how they have moved since you opened the page. The grid below is doing all three, right now.
- median latency
- …
Every figure is read back from the grid’s own statistics engine over these exact rows.
The busier a node runs, the slower it answers. The chart plots it straight from the grid, with a fitted line.
-
Charts
Seventy-eight chart types drawn straight from the grid's own rows. Filter the grid and every chart follows, no export, no second data set, nothing fetched at runtime.
-
Statistics
A median, a 95th percentile or a deviation in the totals row, and a full column profile in a panel, every figure recomputed over exactly the rows you are looking at.
-
Shadow columns
Columns that track what changed since you arrived: delta, times moved, rank and places climbed. Sort by places moved and you have a live top-movers view in one click.
public data, public code
Built with it, in the open
Nine dashboards on real public data, each one a page you can open and a repository you can read. Open one, put it under load, then take the code and start from it.
-
Street crime in central London
Public data that arrives a month at a time, with the table, the headline figures and the charts all moving as each month lands and nothing drawn twice.
Twelve months of central London, tens of thousands of records, first rows on screen in under half a second
-
Exchange rates since the euro began
Ask the rows what they say. Volatility, fat tails, stationarity and control charts are computed over exactly the days in view, and rewritten the moment you narrow them.
7,094 working days of European Central Bank rates, the whole history analysed in under two seconds
-
House sales, nationwide
Every property sale in the latest national release, grouped and pivoted by county, property type and year, with rank, percentile and share of value on every row, and the medians moving the moment you narrow the table.
101,600 sales from HM Land Registry’s latest monthly release, queryable in the browser as a 3.1 MB Parquet file
-
The US national debt, tracked daily
Thirty-three years of the US Treasury’s own daily debt figures, with the day-on-day change, a rolling average and a volatility profile that stay current as new readings arrive.
8,395 daily readings back to 1993, polled live from the Treasury’s own fiscal-data API
demos
Run it, then change it.
Derived chaining
One grid computed from another, and a third from that.
Derived statistics
Correlation, a series summary and a comparison, all computed from the rows above.
Compare groups
The test chosen and why, the p-value, the interval and the verdict.
Explain a number
A total ranked into its contributors, and a change into its drivers.
Clustering
Segments you can group and colour on a scatter, found again as you filter.
Data Router
One live feed to several views.
AI narrative
A result described in plain words.
Statistics panel
The shape of a column, following the filters.
Hello grid
The smallest working grid.
Excel export
The grid out to a workbook.
Pivot
Distinct values of a field become columns.
docs
Reference, how-tos and frameworks.
Derived grids
Computing one grid from another.
Statistics
The statistics layer.
Data sources
Memory, paged, remote and streaming.
API reference
Every option and method.
How-to guides
Short, runnable answers.
React, Vue, Svelte
The same grid mounted from each framework.
Also in the licence
- DashboardsKPI tiles, charts and the Designer, on the same rows.
- GanttDependencies, critical path and resource load.
- KanbanA board over the rows you already have.
- CalendarA schedule view over a date column.
- SchedulerPeople and machines allocated to work.
- FormsForms, the record editor, the app shell, and the context menu, sidebar and toolbar.