@univerjs-pro/engine-pivot 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -2
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/types/filter-util.d.ts +2 -0
- package/lib/types/pivot/model.d.ts +8 -2
- package/lib/types/pivot/pivot-table.d.ts +34 -7
- package/lib/types/summary/summary-manager.d.ts +21 -6
- package/lib/types/types/interface.d.ts +18 -0
- package/lib/types/types/json-types.d.ts +29 -3
- package/lib/types/types/layout-type.d.ts +2 -1
- package/lib/types/util.d.ts +12 -2
- package/lib/umd/index.js +1 -1
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -5,12 +5,36 @@
|
|
|
5
5
|
|
|
6
6
|
## Introduction
|
|
7
7
|
|
|
8
|
-
>
|
|
8
|
+
> 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. This package contains the analyze logic for univer pivot.
|
|
9
|
+
|
|
10
|
+
- 11 subtotal methods supported like excel
|
|
11
|
+
- Dimension label filtering and sorting (using localCompare method), label value filter.
|
|
12
|
+
- tabular layout
|
|
13
|
+
- expand / collapse
|
|
14
|
+
- Supports multiple value dimensions, and can customize the area (value position) and position (value index) of the multi-value dimension.
|
|
15
|
+
- rename field & format filed
|
|
16
|
+
|
|
17
|
+
More info you can get from link [https://docs.univer.ai/en-US/guides/sheets/features/pivot-table/introduction#data-source](https://docs.univer.ai/en-US/guides/sheets/features/pivot-table/introduction#data-source)
|
|
18
|
+
|
|
19
|
+
> This npm package does not depend on any third-party libraries.
|
|
9
20
|
|
|
10
21
|
## Usage
|
|
11
22
|
|
|
23
|
+
We do not recommend using this npm package alone because it is pure calculation logic without any UI. You can use `@univerjs-pro/sheets-pivot` and `@univerjs-pro/sheets-pivot-ui` to get the complete experience, here are the reference links: [https://docs.univer.ai/en-US/guides/sheets/features/pivot-table
|
|
24
|
+
](https://docs.univer.ai/en-US/guides/sheets/features/pivot-table
|
|
25
|
+
)
|
|
12
26
|
### Installation
|
|
13
27
|
|
|
14
28
|
```shell
|
|
15
29
|
npm i @univerjs-pro/engine-pivot
|
|
16
|
-
```
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Performance of Pivot Table
|
|
33
|
+
Test machine spec: a MacBook Pro with Apple Silicon M2 Pro.
|
|
34
|
+
|
|
35
|
+
| Spreadsheet Cells Count | Read data (s) | Query time (s) |
|
|
36
|
+
| :---------------------------------------------------------------------- | :------------ | :------------- |
|
|
37
|
+
| 500k (1 pivot row dimension, 1 pivot col dimension, 2 value dimensions) | 0.252 | 0.040 |
|
|
38
|
+
| 1M (1 pivot row dimension, 1 pivot col dimension, 2 value dimensions) | 0.376 | 0.078 |
|
|
39
|
+
| 2M (1 pivot row dimension, 1 pivot col dimension, 2 value dimensions) | 0.732 | 0.140 |
|
|
40
|
+
| 5M (1 pivot row dimension, 1 pivot col dimension, 2 value dimensions) | 3.200 | 0.415 |
|