PivotFieldCollection

PivotFieldCollection class

Represents a collection of all the PivotField objects in the different regions of the pivot table.

class PivotFieldCollection implements Iterable<PivotField>;

Properties

PropertyTypeDescription
typePivotFieldTypeReadonly. Gets the PivotFields type.

Methods

MethodDescription
get(number)Gets the PivotField Object at the specific index.
get(string)Gets the PivotField Object of the specific name.
getType()@deprecated. Please use the ’type’ property instead. Gets the PivotFields type.
removeAt(number)Removes field by the index. Only for filter,row,column,data region.
addByBaseIndex(number)Adds a PivotField Object to the specific type PivotFields.
add(PivotField)Adds a PivotField Object to the specific type PivotFields.
insert(number, PivotField)Insert a pivot field at specific index.
clear()clear all fields of PivotFieldCollection
remove(PivotField)Removes field from the current region.
move(number, number)Moves the PivotField from current position to destination position
getCount()@deprecated. Please use the ‘count’ property instead. Gets the number of elements contained in.
isNull()Checks whether the implementation object is null.

[Symbol.iterator](): Iterator<PivotField>

Returns an iterator over the items in the collection. Enables use of for...of, spread syntax, and Array.from().

type

Readonly. Gets the PivotFields type.

type : PivotFieldType;

get(number)

Gets the PivotField Object at the specific index.

get(index: number) : PivotField;

Parameters:

ParameterTypeDescription
indexnumber

Returns

PivotField

get(string)

Gets the PivotField Object of the specific name.

get(name: string) : PivotField;

Parameters:

ParameterTypeDescription
namestring

Returns

PivotField

getType()

@deprecated. Please use the ’type’ property instead. Gets the PivotFields type.

getType() : PivotFieldType;

Returns

PivotFieldType

removeAt(number)

Removes field by the index. Only for filter,row,column,data region.

removeAt(index: number) : void;

Parameters:

ParameterTypeDescription
indexnumber

addByBaseIndex(number)

Adds a PivotField Object to the specific type PivotFields.

addByBaseIndex(baseFieldIndex: number) : number;

Parameters:

ParameterTypeDescription
baseFieldIndexnumberfield index in the base PivotFields.

Returns

the index of the PivotField Object in this PivotFields.

add(PivotField)

Adds a PivotField Object to the specific type PivotFields.

add(pivotField: PivotField) : number;

Parameters:

ParameterTypeDescription
pivotFieldPivotFielda PivotField Object.

Returns

the index of the PivotField Object in this PivotFields.

insert(number, PivotField)

Insert a pivot field at specific index.

insert(index: number, pivotField: PivotField) : void;

Parameters:

ParameterTypeDescription
indexnumberThe index.
pivotFieldPivotFieldThe field.

clear()

clear all fields of PivotFieldCollection

clear() : void;

remove(PivotField)

Removes field from the current region.

remove(pivotField: PivotField) : void;

Parameters:

ParameterTypeDescription
pivotFieldPivotField

move(number, number)

Moves the PivotField from current position to destination position

move(currPos: number, destPos: number) : void;

Parameters:

ParameterTypeDescription
currPosnumberCurrent position of PivotField based on zero
destPosnumberDestination position of PivotField based on zero

getCount()

@deprecated. Please use the ‘count’ property instead. Gets the number of elements contained in.

getCount() : number;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;