Skip to content

What is TensorGrid?

Dash TensorGrid is a plug-and-play, open-source OLAP / pivot data grid. It targets the full multi-dimensional analysis surface — symmetric roll-up on both axes, pivots / cross-tabs, aggregations from trivial to heavy, calculated measures, drill-through, and inline editing — behind a Polars engine that does all the math, with the frontend doing zero.

The engine owns the data (what the values are) and the frontend owns the view (what’s expanded). Aggregation always happens in Polars — a sum over a billion source rows collapses to a tree of a few thousand nodes that ships to the browser; expand/collapse is client-side with no round-trip. Heavy interactions (changing the pivot shape, lazy server mode) get a backend round-trip and a loading affordance.

The Python Polars engine (GridDataEngine) is the byte-for-byte oracle. @tensorgrid/core is a TypeScript port, parity-verified against golden fixtures generated from the engine, and it powers three thin view adapters plus the flagship Dash component:

  • Symmetric roll-up / roll-down on BOTH axes — rows and columns are dimensions.
  • Aggregations — built-in, arbitrary Python callables, and a safe formula DSL for calculated measures.
  • Drill-through — retrieve the source rows behind any aggregated cell.
  • Inline editing — server-validated source-row write-back that recomputes every aggregate.
  • Conditional formatting — color scales, data bars, icon sets, and value → style rules.
  • Scale — full-tree (default) or lazy server mode with auto-escalation; row/column virtualization.
  • Export — CSV of the source rows, the aggregated tree, or the pivot cross-tab.