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


Class: PivotTableValueField

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

Parameters

ParameterTypeDefault value
dataFieldIdstringundefined
idstringundefined
displayNamestring''
sourceNamestringundefined

Returns

PivotTableValueField

Overrides

PivotTableFieldBase.constructor

Defined in

pivot/table-field.ts:115

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

Parameters

ParameterType
dataIPivotTableValueFieldJSON

Returns

void

Overrides

PivotTableFieldBase.fromJSON

Defined in

pivot/table-field.ts:165


getDataFieldId()

getDataFieldId(): string

Returns

string

Inherited from

PivotTableFieldBase.getDataFieldId

Defined in

pivot/table-field.ts:78


getDisplayName()

getDisplayName(): string

Returns

string

Inherited from

PivotTableFieldBase.getDisplayName

Defined in

pivot/table-field.ts:94


getFormat()

getFormat(): undefined | string

Returns

undefined | string

Inherited from

PivotTableFieldBase.getFormat

Defined in

pivot/table-field.ts:82


getId()

getId(): string

Returns

string

Inherited from

PivotTableFieldBase.getId

Defined in

pivot/table-field.ts:56


getQueryData()

abstract getQueryData(): IPivotTableValueFieldQueryData

Returns

IPivotTableValueFieldQueryData

  • the query data of the field.

Overrides

PivotTableFieldBase.getQueryData

Defined in

pivot/table-field.ts:135


getShowDataAs()

getShowDataAs(): IPivotTableShowDataAsInfo

Returns

IPivotTableShowDataAsInfo

Defined in

pivot/table-field.ts:131


getSourceName()

getSourceName(): string
  • 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

Defined in

pivot/table-field.ts:64


getSubtotal()

getSubtotal(): PivotSubtotalTypeEnum

Returns

PivotSubtotalTypeEnum

Defined in

pivot/table-field.ts:123


setDataFieldId()

setDataFieldId(dataFieldId): void

Parameters

ParameterType
dataFieldIdstring

Returns

void

Inherited from

PivotTableFieldBase.setDataFieldId

Defined in

pivot/table-field.ts:73


setDisplayName()

setDisplayName(displayName): void

Parameters

ParameterType
displayNamestring

Returns

void

Inherited from

PivotTableFieldBase.setDisplayName

Defined in

pivot/table-field.ts:90


setFormat()

setFormat(format): void

Parameters

ParameterType
formatundefined | string

Returns

void

Inherited from

PivotTableFieldBase.setFormat

Defined in

pivot/table-field.ts:86


setShowDataAs()

setShowDataAs(showDataAs): void

Parameters

ParameterType
showDataAsIPivotTableShowDataAsInfo

Returns

void

Defined in

pivot/table-field.ts:127


setSourceName()

setSourceName(sourceName): void

Parameters

ParameterType
sourceNamestring

Returns

void

Inherited from

PivotTableFieldBase.setSourceName

Defined in

pivot/table-field.ts:68


setSubtotal()

setSubtotal(subtotal): void

Parameters

ParameterType
subtotalPivotSubtotalTypeEnum

Returns

void

Defined in

pivot/table-field.ts:119


toJSON()

toJSON(): IPivotTableValueFieldJSON

Returns

IPivotTableValueFieldJSON

  • the JSON data of the value field.

Overrides

PivotTableFieldBase.toJSON

Defined in

pivot/table-field.ts:149