@univerjs-pro/engine-pivot 0.21.1 → 0.22.0-insiders.20260513-09bbeca
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 +20 -43
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -1,57 +1,34 @@
|
|
|
1
1
|
# @univerjs-pro/engine-pivot
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.
|
|
4
|
-
[](https://npmjs.com/package/@univerjs-pro/engine-pivot)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/engine-pivot)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
`@univerjs-pro/engine-pivot` provides pivot table calculation engine for Univer Pro.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Package Overview
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
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
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/engine-pivot` | `UniverProEnginePivot` | No | No | No |
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
## Installation
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
)
|
|
26
|
-
### Installation
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
npm i @univerjs-pro/engine-pivot
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/engine-pivot
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/engine-pivot
|
|
30
20
|
```
|
|
31
21
|
|
|
32
|
-
|
|
33
|
-
Test machine spec: a MacBook Pro with Apple Silicon M2 Pro.
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
34
23
|
|
|
35
|
-
|
|
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 |
|
|
41
|
-
|
|
42
|
-
## Custom Parameters
|
|
43
|
-
|
|
44
|
-
The following config is global config for pivot engine.
|
|
24
|
+
## Usage
|
|
45
25
|
|
|
46
|
-
```
|
|
47
|
-
import {
|
|
26
|
+
```ts
|
|
27
|
+
import { PivotModel, PivotTable } from '@univerjs-pro/engine-pivot';
|
|
28
|
+
```
|
|
48
29
|
|
|
49
|
-
|
|
50
|
-
setDateSystem(PivotDateGroupFieldDateSystemEnum.Date1904)
|
|
30
|
+
## Resources
|
|
51
31
|
|
|
52
|
-
|
|
53
|
-
|
|
32
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
33
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/engine-pivot)
|
|
54
34
|
|
|
55
|
-
// change the default pivot sort type, if the pivot table not set sort info, it will works as default
|
|
56
|
-
setDefaultSortType('ascending')
|
|
57
|
-
```
|