@univerjs-pro/engine-pivot v0.5.4


Class: PivotView

Defined in: layout/pivot-view.ts:9

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

Defined in: layout/pivot-view.ts:39

Returns

PivotView

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

Defined in: layout/pivot-view.ts:81

Parameters

ParameterType
dataIPivotViewJSON

Returns

void


getVersion()

getVersion(): number

Defined in: layout/pivot-view.ts:64

Returns

number


setFormat()

setFormat(model): void

Defined in: layout/pivot-view.ts:53

  • 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


setVersion()

setVersion(version?): void

Defined in: layout/pivot-view.ts:43

Parameters

ParameterType
version?number

Returns

void


toJSON()

toJSON(): IPivotViewJSON

Defined in: layout/pivot-view.ts:68

Returns

IPivotViewJSON