@gridstorm/analytix-pivot-engine
v0.1.1
Published
Pivot table computation engine for Analytics Builder
Readme
@gridstorm/analytix-pivot-engine
Pivot table computation engine for Analytics Studio — group, aggregate, and filter data visually with drag-and-drop.
Install
npm install @gridstorm/analytix-core @gridstorm/analytix-pivot-engineQuick Start
import { PivotEngine } from '@gridstorm/analytix-pivot-engine';
const pivot = new PivotEngine({
rows: ['region', 'category'],
columns: ['quarter'],
values: [{ field: 'revenue', aggregation: 'sum' }],
filters: [{ field: 'year', value: 2024 }],
});
const result = pivot.compute(dataset);
// result.cells — 2D array of aggregated values
// result.rowHeaders — row hierarchy
// result.colHeaders — column hierarchyAggregation Functions
sum, count, avg, min, max, median, stddev, variance, countDistinct
Links
License
MIT © Tekivex
