@univerjs-pro/engine-pivot v0.5.4


Class: PivotTableValueField

Defined in: pivot/table-field.ts:112

Represents a base class for the field in a pivot table.

Description

The base class for the field in a pivot table.

Extends

Constructors

new PivotTableValueField()

new PivotTableValueField(
   dataFieldId, 
   id, 
   displayName, 
   sourceName): PivotTableValueField

Defined in: pivot/table-field.ts:115

Parameters

ParameterTypeDefault value
dataFieldIdstringundefined
idstringundefined
displayNamestring''
sourceNamestringundefined

Returns

PivotTableValueField

Overrides

PivotTableFieldBase.constructor

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
dataFieldIdreadonlystringThe base data field id of the field.PivotTableFieldBase.dataFieldIdpivot/table-field.ts:38
displayNamepublicstringThe display name of the field. the default value is the data field name.PivotTableFieldBase.displayNamepivot/table-field.ts:44
formatpublicundefined | string-PivotTableFieldBase.formatpivot/table-field.ts:45
idreadonlystringThe unique identifier of the field.PivotTableFieldBase.idpivot/table-field.ts:39
lossLessProperty?publicanythr public object to save the property not defined but should be saved.PivotTableFieldBase.lossLessPropertypivot/table-field.ts:47
showDataAspublicIPivotTableShowDataAsInfo--pivot/table-field.ts:114
sourceNamereadonlystring-PivotTableFieldBase.sourceNamepivot/table-field.ts:40
subtotalpublicPivotSubtotalTypeEnum--pivot/table-field.ts:113

Methods

fromJSON()

fromJSON(data): void

Defined in: pivot/table-field.ts:165

Parameters

ParameterType
dataIPivotTableValueFieldJSON

Returns

void

Overrides

PivotTableFieldBase.fromJSON


getDataFieldId()

getDataFieldId(): string

Defined in: pivot/table-field.ts:78

Returns

string

Inherited from

PivotTableFieldBase.getDataFieldId


getDisplayName()

getDisplayName(): string

Defined in: pivot/table-field.ts:94

Returns

string

Inherited from

PivotTableFieldBase.getDisplayName


getFormat()

getFormat(): undefined | string

Defined in: pivot/table-field.ts:82

Returns

undefined | string

Inherited from

PivotTableFieldBase.getFormat


getId()

getId(): string

Defined in: pivot/table-field.ts:56

Returns

string

Inherited from

PivotTableFieldBase.getId


getQueryData()

abstract getQueryData(): IPivotTableValueFieldQueryData

Defined in: pivot/table-field.ts:135

Returns

IPivotTableValueFieldQueryData

  • the query data of the field.

Overrides

PivotTableFieldBase.getQueryData


getShowDataAs()

getShowDataAs(): IPivotTableShowDataAsInfo

Defined in: pivot/table-field.ts:131

Returns

IPivotTableShowDataAsInfo


getSourceName()

getSourceName(): string

Defined in: pivot/table-field.ts:64

  • the read only name in collection

Returns

string

  • the source name of the field, which is the name of the data field.

Inherited from

PivotTableFieldBase.getSourceName


getSubtotal()

getSubtotal(): PivotSubtotalTypeEnum

Defined in: pivot/table-field.ts:123

Returns

PivotSubtotalTypeEnum


setDataFieldId()

setDataFieldId(dataFieldId): void

Defined in: pivot/table-field.ts:73

Parameters

ParameterType
dataFieldIdstring

Returns

void

Inherited from

PivotTableFieldBase.setDataFieldId


setDisplayName()

setDisplayName(displayName): void

Defined in: pivot/table-field.ts:90

Parameters

ParameterType
displayNamestring

Returns

void

Inherited from

PivotTableFieldBase.setDisplayName


setFormat()

setFormat(format): void

Defined in: pivot/table-field.ts:86

Parameters

ParameterType
formatundefined | string

Returns

void

Inherited from

PivotTableFieldBase.setFormat


setShowDataAs()

setShowDataAs(showDataAs): void

Defined in: pivot/table-field.ts:127

Parameters

ParameterType
showDataAsIPivotTableShowDataAsInfo

Returns

void


setSourceName()

setSourceName(sourceName): void

Defined in: pivot/table-field.ts:68

Parameters

ParameterType
sourceNamestring

Returns

void

Inherited from

PivotTableFieldBase.setSourceName


setSubtotal()

setSubtotal(subtotal): void

Defined in: pivot/table-field.ts:119

Parameters

ParameterType
subtotalPivotSubtotalTypeEnum

Returns

void


toJSON()

toJSON(): IPivotTableValueFieldJSON

Defined in: pivot/table-field.ts:149

Returns

IPivotTableValueFieldJSON

  • the JSON data of the value field.

Overrides

PivotTableFieldBase.toJSON