@univerjs-pro/engine-pivot v0.5.0-beta.1Docs


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

PivotView

Defined in

layout/pivot-view.ts:39

Properties

PropertyTypeDefault valueDescriptionDefined in
colViewLabelViewItemundefinedthe col view of the pivot tablelayout/pivot-view.ts:21
cornerViewPivotViewItemundefinedthe corner view of the pivot tablelayout/pivot-view.ts:29
dataViewPivotViewItemundefinedthe data view of the pivot tablelayout/pivot-view.ts:25
formatMapRecord<string, string>{}the format map of the table field id, it will be used to store the format of the pivot viewlayout/pivot-view.ts:38
pageViewPageViewItemundefinedthe page view of the pivot tablelayout/pivot-view.ts:13
rowViewLabelViewItemundefinedthe row view of the pivot tablelayout/pivot-view.ts:17
versionnumberundefinedthe version of the pivot view, it will be used to check the view is the latestlayout/pivot-view.ts:33

Methods

formJSON()

formJSON(data): void

Parameters

ParameterType
dataIPivotViewJSON

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

ParameterTypeDescription
modelPivotModelthe 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

ParameterType
version?number

Returns

void

Defined in

layout/pivot-view.ts:43


toJSON()

toJSON(): IPivotViewJSON

Returns

IPivotViewJSON

Defined in

layout/pivot-view.ts:68