npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oge-ui/pivot

v0.13.0

Published

Angular pivot grid for interactive data analysis: field panel, drill-down, virtualized axes, remote data and Excel export. Source-available commercial license (free for evaluation and development).

Readme

@oge-ui/pivot

Commercial package. Unlike the rest of the OGE UI suite (MIT), the pivot grid is source-available commercial software: free for evaluation, development and testing — a paid license is required for production use. See LICENSE and ogeui.com/license.

Pivot grid for Angular, built on the same signal-based foundation as @oge-ui/grid. The aggregation engine lives in @oge-ui/core as pure, framework-free TypeScript — the component renders whatever the engine materializes.

  • Four areas (row / column / data / filter) declared with <oge-pivot-field> directives; drag chips between areas or use the field chooser dialog (applyChangesMode: 'instantly' | 'onDemand')
  • Single-pass aggregation: axis paths are interned once, expand/collapse only re-materializes the visible matrix; an expanded group keeps its own line, which carries the subtotals
  • Summary types (sum / count / avg / min / max / custom reducers) and display modes: percent of row/column/grand totals, running totals with per-group reset, absolute/percent variation against the previous column
  • Date and numeric group intervals (year / quarter / month / day / dayOfWeek, numeric bucket size)
  • Sorting by labels or by a summary value at any opposite-axis path; field filters with include/exclude and searchable distinct values
  • Drill-down: drillDown({ rowPath, columnPath }) returns the raw rows behind any cell, with timezone-safe date range filters for remote stores
  • Two-axis virtual scrolling ([virtualScrolling]="true") — only visible headers and cells hit the DOM on both axes
  • Remote mode: implement OgePivotStore and receive fully serializable PivotLoadOptions (fields, measures, expanded paths, filter); loads are abortable, LocalPivotStore is the reference implementation
  • customizeCell appearance hook, keyboard navigation over the matrix, localizable via the OGE_PIVOT_MESSAGES token
  • State persistence (stateKey) through the shared OGE_STATE_STORAGE token; state() / applyState() / stateChange for manual control
  • Export: getCsv() / exportCsv() built in; Excel with merged multi-level headers and typed cells via the lazy @oge-ui/pivot/export-excel entry

Install

npm i @oge-ui/pivot @oge-ui/grid @oge-ui/core

Quick start

import { OgePivotGrid, OgePivotField } from '@oge-ui/pivot';

@Component({
  imports: [OgePivotGrid, OgePivotField],
  template: `
    <oge-pivot-grid [data]="sales">
      <oge-pivot-field dataField="region" area="row" />
      <oge-pivot-field dataField="city" area="row" />
      <oge-pivot-field dataField="date" area="column" groupInterval="year" />
      <oge-pivot-field dataField="amount" area="data" summaryType="sum" />
    </oge-pivot-grid>
  `,
})
export class SalesPage {
  sales = [
    { region: 'EU', city: 'Berlin', date: '2024-03-01', amount: 100 },
    { region: 'EU', city: 'Paris', date: '2024-06-11', amount: 50 },
  ];
}

Display modes

Measures can post-process their values after aggregation:

<oge-pivot-field dataField="amount" caption="% of Column" area="data" summaryType="sum" summaryDisplayMode="percentOfColumnGrandTotal" /> <oge-pivot-field dataField="amount" caption="Running" area="data" summaryType="sum" [runningTotal]="{ direction: 'row' }" />

The same options are reachable at runtime from each measure chip's menu.

Remote data

Pass an OgePivotStore instead of an array. The store receives a serializable description of the request — fields per area, measures as standard summary descriptors, the combined field filter and the expanded paths of both axes — and answers with header trees plus an aligned value matrix:

class SalesPivotStore implements OgePivotStore<Sale> {
  load(options: PivotLoadOptions): Promise<PivotLoadResult> {
    return this.http.post<PivotLoadResult>('/api/sales/pivot', options);
  }
}

Expanding a header issues a new load with the extended path set; in-flight requests are aborted through options.signal.

Export

grid.exportCsv('sales.csv'); // what's on screen, headers flattened

const { exportPivotToExcel } = await import('@oge-ui/pivot/export-excel');
await exportPivotToExcel(grid, { filename: 'sales.xlsx' });

The Excel entry keeps exceljs out of your main bundle (optional peer); buildPivotWorkbook(result) is exported separately for custom pipelines.

State persistence

<oge-pivot-grid [data]="sales" stateKey="sales-report" />

Field layout (areas, order, summary settings, filters), expansion on both axes and the field panel state round-trip through OGE_STATE_STORAGE (default: localStorage; pluggable with any async backend).

Imperative API & events

Methods: getResult() (the matrix exactly as rendered), drillDown(args), expandAll(area) / collapseAll(area), getFieldLayout(), showFieldChooser(), state() / applyState(), getCsv() / exportCsv(). Events: (cellClick) / (cellDblClick){ rowPath, columnPath, measureIndex, value, event }, (fieldLayoutChange), (stateChange); the DevExtreme cellPrepared callback maps to the customizeCell input, and jQuery-era lifecycle members (option(), repaint(), onInitialized/onOptionChanged/onContentReady) are intentionally not replicated — signals and Angular lifecycle cover them.

Theming

The shared theme files ship with @oge-ui/grid and style all suite components:

@import '@oge-ui/grid/themes/dark.css';

For AI coding assistants

The complete machine-readable API reference ships inside the package at node_modules/@oge-ui/pivot/llms.txt — conventions, every documented member and copy-pasteable demos in one file. Online: https://ogeui.com/llms.txt (index) and https://ogeui.com/llms-full.txt (the whole suite).