Univer
Univer Sheet
Features
Pivot Table

Pivot Table

📊 Univer Sheet

Pivot table is a powerful data analysis tool that can quickly summarize, organize and analyze large amounts of data, thereby helping users discover patterns and trends in the data.

  • @univerjs-pro/engine-pivot provides the most basic data calculation capabilities for pivot tables. The plugin does not rely on any third-party plug-ins for its work.
  • @univerjs-pro/sheets-pivot assembles engine-pivot into universal sheet plugin to support table rendering, collaboration, formulas and other capabilities
  • @univerjs-pro/sheets-pivot-ui provides a basic drag-and-drop interface & filtering and other dialogs required for interaction

Feature ability

💡

Since PivotTable is a very complex and large-scale function, we currently provide a beta version and will continue to iterate in the future.

Currently supported functions

  • 11 subtotal methods supported like excel
  • Dimension label filtering and sorting (using localCompare method)
  • tabular layout
  • expand / collapse
  • Supports multiple value dimensions, and can customize the area (value position) and position (value index) of the multi-value dimension.
  • rename field & format filed
  • auto refresh when data source range change and dirty formula witch ref the pivot table area

Planning features

  • Group , the date group & element group & number group
  • Filter & sort, support the value filter and value sort
  • Show data as, support all kind of show data as type in excel
  • Calc field & calc item
  • Enhance the layout ability, support compact & outline layout, merge items and blank rows.

Installation

pnpm add @univerjs-pro/engine-pivot @univerjs/sheets-pivot @univerjs/sheets-pivot-ui

Import

import '@univerjs-pro/sheets-pivot-ui/lib/index.css';
 
import { UniverSheetsPivotTablePlugin } from '@univerjs-pro/sheets-pivot';
import { UniverSheetsPivotTableUIPlugin } from '@univerjs-pro/sheets-pivot-ui';

Internationalization

import { LocaleType, Tools } from '@univerjs/core';
import SheetsPivotTableEnUS from '@univerjs-pro/sheets-pivot/locale/en-US';
import SheetsPivotTableUIEnUS from '@univerjs-pro/sheets-pivot-ui/locale/en-US';
 
const univer = new Univer({
  theme: defaultTheme,
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: Tools.deepMerge(
      SheetsPivotTableEnUS,
      SheetsPivotTableUIEnUS
    ),
  },
});

Register

univer.registerPlugin(UniverSheetsPivotTablePlugin);
univer.registerPlugin(UniverSheetsPivotTableUIPlugin);

Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.