PivotItemCollection

PivotItemCollection class

Represents all the PivotItem objects in the PivotField.

class PivotItemCollection implements Iterable<PivotItem>;

Methods

MethodDescription
get(number)Gets the PivotItem Object at the specific index.
get(string)Gets the PivotItem by the specific name.
hideAllDetail(boolean)Sets whether to hide all detail of all PivotItems in a pivot field. That is collapse/expand this field.
swapItem(number, number)Directly swap two items.
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<PivotItem>

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

get(number)

Gets the PivotItem Object at the specific index.

get(index: number) : PivotItem;

Parameters:

ParameterTypeDescription
indexnumber

Returns

PivotItem

get(string)

Gets the PivotItem by the specific name.

get(itemValue: string) : PivotItem;

Parameters:

ParameterTypeDescription
itemValuestring

Returns

PivotItem

hideAllDetail(boolean)

Sets whether to hide all detail of all PivotItems in a pivot field. That is collapse/expand this field.

hideAllDetail(isHiddenDetail: boolean) : void;

Parameters:

ParameterTypeDescription
isHiddenDetailbooleanWhether hide the detail of the pivot field.

swapItem(number, number)

Directly swap two items.

swapItem(index1: number, index2: number) : void;

Parameters:

ParameterTypeDescription
index1number
index2number

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;