@univerjs-pro/engine-pivot v0.5.0-beta.1 • Docs
Class: PivotView
PivotView
Description
the view of pivot table, which contains the page, row, col, data view, the page view separation the pivot table to two areas, the row and col view as the header of data area
Constructors
new PivotView()
new PivotView(): PivotView
Returns
Defined in
layout/pivot-view.ts:39
Properties
Property | Type | Default value | Description | Defined in |
---|---|---|---|---|
colView | LabelViewItem | undefined | the col view of the pivot table | layout/pivot-view.ts:21 |
cornerView | PivotViewItem | undefined | the corner view of the pivot table | layout/pivot-view.ts:29 |
dataView | PivotViewItem | undefined | the data view of the pivot table | layout/pivot-view.ts:25 |
formatMap | Record <string , string > | {} | the format map of the table field id, it will be used to store the format of the pivot view | layout/pivot-view.ts:38 |
pageView | PageViewItem | undefined | the page view of the pivot table | layout/pivot-view.ts:13 |
rowView | LabelViewItem | undefined | the row view of the pivot table | layout/pivot-view.ts:17 |
version | number | undefined | the version of the pivot view, it will be used to check the view is the latest | layout/pivot-view.ts:33 |
Methods
formJSON()
formJSON(data): void
Parameters
Parameter | Type |
---|---|
data | IPivotViewJSON |
Returns
void
Defined in
layout/pivot-view.ts:81
getVersion()
getVersion(): number
Returns
number
Defined in
layout/pivot-view.ts:64
setFormat()
setFormat(model): void
- the func effect is to set the format code , for label view, it will used to format the header , such as date type data, in the data view, it will used to format the data of show data as
Parameters
Parameter | Type | Description |
---|---|---|
model | PivotModel | the pivot model, it will be used to set the format of the pivot view |
Returns
void
Defined in
layout/pivot-view.ts:53
setVersion()
setVersion(version?): void
Parameters
Parameter | Type |
---|---|
version ? | number |
Returns
void
Defined in
layout/pivot-view.ts:43
toJSON()
toJSON(): IPivotViewJSON
Returns
Defined in
layout/pivot-view.ts:68