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

@univerjs-pro/sheets-pivot-chart

v1.0.3

Published

Pivot chart integration for Univer Sheets.

Readme

@univerjs-pro/sheets-pivot-chart

npm version license downloads

@univerjs-pro/sheets-pivot-chart is part of Univer Pro. It provides the Sheet-hosted data and runtime integration for Univer PivotChart.

Package Overview

| Package | UMD global | CSS | Locales | Facade entry | | --- | --- | :---: | :---: | :---: | | @univerjs-pro/sheets-pivot-chart | UniverProSheetsPivotChart | No | No | Yes |

Installation

pnpm add @univerjs-pro/sheets-pivot-chart
# or
npm install @univerjs-pro/sheets-pivot-chart

Keep all @univerjs/* and @univerjs-pro/* packages on the same version.

Usage

import { UniverSheetsPivotChartPlugin } from '@univerjs-pro/sheets-pivot-chart';

univer.registerPlugin(UniverSheetsPivotChartPlugin);

The package currently exposes the PivotChart model, commands, mutations, Worker calculation, and ChartModel binding. UI integration is provided separately.

Worker calculation

When Pivot calculation runs in a Worker, register the main-process plugin with calculation disabled. Configure the PivotTable plugin the same way:

import { UniverSheetsPivotTablePlugin } from '@univerjs-pro/sheets-pivot';
import { UniverSheetsPivotChartPlugin } from '@univerjs-pro/sheets-pivot-chart';

univer.registerPlugin(UniverSheetsPivotTablePlugin, { notExecuteFormula: true });
univer.registerPlugin(UniverSheetsPivotChartPlugin, { notExecuteFormula: true });

In the Worker, use the calculation-only plugin, alongside the existing RPC and formula Worker setup:

import { UniverSheetsPivotTablePlugin } from '@univerjs-pro/sheets-pivot';
import { UniverSheetsPivotChartWorkerPlugin } from '@univerjs-pro/sheets-pivot-chart';

univer.registerPlugin(UniverSheetsPivotTablePlugin, { notExecuteFormula: false });
univer.registerPlugin(UniverSheetsPivotChartWorkerPlugin);

The advanced Sheets presets configure this split when Worker calculation is enabled. Do not register the main-process PivotChart plugin inside the Worker: ChartModel/Drawing bindings belong to the main process. Owned field edits and filter-data requests use the calculation message bridge; undoable mutations remain coordinated by the main process. Linked field edits continue to use the referenced PivotTable commands.

Integration Notes

Creation modes

InsertPivotChartCommand accepts exactly one Pivot data source:

  • sourceRangeInfo creates an independent PivotChart with a chart-owned PivotModel.
  • pivotTableRef links the chart to an existing PivotTable. The chart stores only the reference and its visual configuration; the PivotTable remains the sole owner of the PivotModel and Pivot Cache report.
await commandService.executeCommand(InsertPivotChartCommand.id, {
    unitId,
    subUnitId,
    pivotTableRef: {
        unitId,
        subUnitId: pivotTableSheetId,
        pivotTableId,
    },
});

Field changes made through a linked PivotChart are delegated to the referenced PivotTable commands. Removing the chart does not remove the PivotTable. If the PivotTable is removed, the chart becomes unavailable and reconnects when the same PivotTable is restored.

Resources