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

@prismbi/prismbi

v0.23.0

Published

PrismBI - Power BI-style data modeling and interactive reports for the web, in TypeScript. DAX-like engine, 40 visuals, slicing and cross-filtering, a drag-and-drop studio, connectors, a Web Worker engine, AI questions/insights/agent tools, web components

Readme

PrismBI

Power BI-style data modeling and interactive reports for the web, written in TypeScript.

Live demo · Docs · Playground · Studio

A PrismBI report: slicers, KPI cards and cross-filtering charts

| Studio | Agent panel | Playground | |---|---|---| | PrismBI Studio | The Studio agent panel | The live playground |

PrismBI gives you a semantic model with relationships, a DAX-like formula engine, 40 interactive visuals, slicers, cross-filtering, drill down and drill-through, a filter pane, bookmarks and themes. It also includes a drag-and-drop report editor (@prismbi/prismbi/studio). It has zero dependencies: about 82 KB min+gzip for the core (model, DAX engine, report runtime), about 101 KB for a dashboard with five visuals, and about 125 KB with every visual (npm run size). Connectors (CSV, REST, GraphQL, Arrow, SQL, streaming) and a Web Worker engine are separate small entries. It runs in any framework and has first-class React bindings.

npm install @prismbi/prismbi
import { DataModel, Report } from '@prismbi/prismbi';

const model = new DataModel()
  .addTable('Sales', salesRows)
  .addTable('Products', productRows)
  .addDateTable('Date', '2024-01-01', '2025-12-31')
  .addRelationship({ from: 'Sales[ProductId]', to: 'Products[Id]' })
  .addRelationship({ from: 'Sales[OrderDate]', to: 'Date[Date]' })
  .addMeasure('Total Sales', 'SUM(Sales[Amount])', { format: '$#,0' })
  .addMeasure('YoY %', 'DIVIDE([Total Sales] - CALCULATE([Total Sales], SAMEPERIODLASTYEAR(Date[Date])), CALCULATE([Total Sales], SAMEPERIODLASTYEAR(Date[Date])))', { format: '0.0%' });

new Report(document.getElementById('app')!, {
  model,
  pages: [{
    name: 'Overview',
    visuals: [
      { type: 'slicer', layout: { x: 0, y: 0, w: 12, h: 2 }, fields: { field: 'Date[Year]' }, format: { slicer: { style: 'tiles' } } },
      { type: 'card', layout: { x: 0, y: 2, w: 3, h: 3 }, fields: { value: 'Total Sales', delta: 'YoY %' } },
      { type: 'clusteredColumn', title: 'Sales by category', layout: { x: 3, y: 2, w: 9, h: 7 },
        fields: { category: ['Products[Category]', 'Products[Name]'], values: 'Total Sales' } },
    ],
  }],
});

Clicking a column filters the card. Clicking a slicer tile filters both, and double-clicking a column drills from Category down to Name.

Why PrismBI

| | | |---|---| | Real BI semantics | Filter context, row context, context transition, CALCULATE with ALL, ALLEXCEPT, ALLSELECTED, KEEPFILTERS, USERELATIONSHIP and CROSSFILTER, time intelligence, financial functions (XNPV, XIRR, PMT, PV, FV, NPER, IPMT, PPMT, RATE, IRR), bitwise DAX, table constructors, tuple IN, auto-exist grouping, and true (non-additive) totals. Over 175 DAX functions | | Advanced modeling | Bidirectional, many-to-many and inactive relationships, calculated tables, calculation groups, field and what-if parameters, hierarchies, perspectives, row-level security | | Report editor | @prismbi/prismbi/studio: drag-and-drop canvas with magnetic alignment guides, visual grouping & containers, selection & layers pane, quick measures wizard, fields, build, format and filters panes, measure/column editors, DAG hierarchical model layout, virtualized data view, theme designer, undo/redo, autosave, versioned JSON | | Developer tooling | DAX language service (completion, hover, diagnostics, signature help), formatter, dependency explanation, evaluateTable() queries | | Slice and narrow down | Slicers (list, dropdown, tiles, range, relative date, hierarchy tree, synced across pages), cross-filter and cross-highlight, Ctrl+click multi-select, right-click Include / Exclude, drill down / up / expand all, drill-through pages with Back, a decomposition tree, report, page and visual filters, a filter pane with Basic, Advanced and Top N, bookmarks | | 40 visuals | Column and bar (clustered, stacked, 100%), line, area, stacked area, combo (dual-axis / secondary Y-scale), ribbon, waterfall, pie, donut, treemap, sunburst, funnel, scatter and bubble, histogram, box plot, bullet, radar, sankey, chord diagram, network graph (force-directed with node dragging), gantt chart, candlestick (OHLC with volume), heatmap, bubble and filled maps (with custom GeoJSON territories), decomposition tree, card, multi-row card, KPI, gauge, goals scorecard, table, matrix (stepped layout and in-cell sparklines), slicer, text, sweep-line collision avoidance for data labels, and small multiples across cartesian, scatter, and bullet charts | | Light and fast | Zero dependencies. A columnar engine with typed-array views, 64-bit group key encoding, multi-worker parallel execution pool, vectorised aggregations, a single-pass grouped query path, hash indexes and caches. Queries over 1M rows, including YTD per day, take 12–191 ms cold. LTTB-thinned lines, canvas scatter, virtualized tables, and an optional Web Worker engine | | Live data | @prismbi/prismbi/connectors: zero-copy streaming CSV to packed columnar buffers, URL streaming, Google Sheets, JSON, paginated REST, GraphQL, Apache Arrow (Parquet via DuckDB-Wasm), SQL adapters, WebSocket and EventSource streaming into sliding windows, scheduled refresh | | Analytics | Continuous time and number axes, log scales, automated time-series anomaly detection (detrended IQR and Z-score with visual beacons and explanation badges), reference lines (constant, average, median, min, max, percentile), reference bands & target ranges, trend lines, rule- and gradient-based colours, data label contrast and threshold rules, report-page tooltips, real totals | | Customizable | Theme tokens and CSS variables, Power BI theme JSON import, per-visual format panes, theme visualStyles, custom tooltips, custom visuals, PNG/SVG/CSV/PDF (crisp resolution-independent vector paths or raster)/PowerPoint (.pptx)/Word (.docx) export, standalone single-file HTML dashboards, copy visual image to clipboard, edit-interactions mode | | Accessible | Keyboard-reachable marks, ARIA roles, legends whenever there are two or more series, show-as-table on every chart, reduced motion, light and dark palettes validated for colour-vision deficiency |

Entry points

| Import | What | |---|---| | @prismbi/prismbi | Everything: model, DAX, report runtime and all 40 visuals | | @prismbi/prismbi/core + @prismbi/prismbi/visuals | Lean builds: register only the visuals you use | | @prismbi/prismbi/studio | Drag-and-drop report editor | | @prismbi/prismbi/react | <PrismReport>, <PrismVisual>, <PrismStudio> | | @prismbi/prismbi/elements | <prism-report>, <prism-visual> web components (Vue, Svelte, Angular, plain HTML) | | @prismbi/prismbi/connectors | CSV, REST, GraphQL, Arrow, SQL, streaming, scheduled refresh | | @prismbi/prismbi/worker | Run the model in a Web Worker | | @prismbi/prismbi/geo | World countries, US states, and custom GeoJSON territories for maps | | @prismbi/prismbi/sql | Push visual queries down to DuckDB, Postgres, SQLite, MySQL, Snowflake, SQL Server (T-SQL), BigQuery, ClickHouse (with parameterized mode and LRU query cache) | | @prismbi/prismbi/ai | Ask, explain, insights, agent tools, and standalone MCP server (Claude, OpenAI, Cursor, Gemini) | | @prismbi/prismbi/plugins | Signed plugins, catalogs and an install gallery | | @prismbi/prismbi/collab | Live co-editing, presence and comments | | @prismbi/prismbi/server | Headless SVG/HTML rendering, measure alerts, scheduled report jobs | | @prismbi/prismbi/powerbi | Import Power BI .pbip projects (model, measures, report) | | @prismbi/prismbi/files | Report files for Git, plus diffs (also the @prismbi/prismbi CLI) |

Lean builds

@prismbi/prismbi/core has the model, DAX and report runtime without any visuals. Add visuals per family; each import registers its visuals:

import { Report, DataModel } from '@prismbi/prismbi/core';
import '@prismbi/prismbi/visuals/bar';      // column and bar charts
import '@prismbi/prismbi/visuals/card';
import '@prismbi/prismbi/visuals/slicer';

Entries: bar, line, pie, treemap, sunburst, scorecard, funnel, scatter, card, kpi, gauge, table, slicer, text, waterfall, heatmap, calendar, decomposition, distribution, bullet, radar, sankey, ribbon, map, gantt, candlestick, chord, network. Each also exports its definitions (import { waterfall } from '@prismbi/prismbi/visuals/waterfall'). Minified and gzipped, core with one visual is about 89 KB; the full package is about 125 KB. You can also import definitions from @prismbi/prismbi/visuals and call registerVisual yourself.

React

import { PrismReport, PrismVisual } from '@prismbi/prismbi/react';

<PrismReport model={model} definition={reportJson} theme="dark"
  onSelectionChanged={(e) => console.log(e.filters)} style={{ height: 720 }} />

<PrismVisual model={model} type="line" fields={{ category: 'Date[MonthShort]', values: 'Total Sales' }} />

Documentation

Develop

npm install
npm run dev        # demo dashboard at http://localhost:5173, studio at /studio.html, scale demo at /perf.html
npm test           # vitest (engine, DAX, formatting, rendering, interactions)
npm run typecheck
npm run bench      # 200k / 1M-row query timings
npm run build      # dist/ (ESM + CJS + .d.ts)
npm run docs       # docs site at /docs/ and the live playground at /playground.html
npm run docs:images  # regenerate the screenshots in docs/images (headless Chrome)

License

MIT