PivotField
PivotField class
Represents a field in a PivotTable report.
class PivotField;
Methods
Method | Description |
---|---|
getPivotItems() | Gets the pivot items of the pivot field |
getGroupSettings() | Gets the group settings of the pivot field. |
isCalculatedField() | Indicates whether the specified PivotTable field is calculated field. |
getBaseIndex() | Represents the PivotField index in the base PivotFields. |
setBaseIndex(number) | Represents the PivotField index in the base PivotFields. |
getPosition() | Represents the index of PivotField in the region. |
getName() | Represents the name of PivotField. |
setName(string) | Represents the name of PivotField. |
getDisplayName() | Represents the PivotField display name. |
setDisplayName(string) | Represents the PivotField display name. |
isAutoSubtotals() | Indicates whether the specified field shows automatic subtotals. Default is true. |
setIsAutoSubtotals(boolean) | Indicates whether the specified field shows automatic subtotals. Default is true. |
getDragToColumn() | Indicates whether the specified field can be dragged to the column position. The default value is true. |
setDragToColumn(boolean) | Indicates whether the specified field can be dragged to the column position. The default value is true. |
getDragToHide() | Indicates whether the specified field can be dragged to the hide position. The default value is true. |
setDragToHide(boolean) | Indicates whether the specified field can be dragged to the hide position. The default value is true. |
getDragToRow() | Indicates whether the specified field can be dragged to the row position. The default value is true. |
setDragToRow(boolean) | Indicates whether the specified field can be dragged to the row position. The default value is true. |
getDragToPage() | Indicates whether the specified field can be dragged to the page position. The default value is true. |
setDragToPage(boolean) | Indicates whether the specified field can be dragged to the page position. The default value is true. |
getDragToData() | Indicates whether the specified field can be dragged to the data position. The default value is true. |
setDragToData(boolean) | Indicates whether the specified field can be dragged to the data position. The default value is true. |
isMultipleItemSelectionAllowed() | indicates whether the field can have multiple items selected in the page field The default value is false. |
setIsMultipleItemSelectionAllowed(boolean) | indicates whether the field can have multiple items selected in the page field The default value is false. |
isRepeatItemLabels() | Indicates whether repeating labels of the field in the region. The default value is false. |
setIsRepeatItemLabels(boolean) | Indicates whether repeating labels of the field in the region. The default value is false. |
isIncludeNewItemsInFilter() | Indicates whether including new items to the field in manual filter. The default value is false. |
setIsIncludeNewItemsInFilter(boolean) | Indicates whether including new items to the field in manual filter. The default value is false. |
isInsertPageBreaksBetweenItems() | Indicates whether inserting page breaks after each item. The default value is false. |
setIsInsertPageBreaksBetweenItems(boolean) | Indicates whether inserting page breaks after each item. The default value is false. |
getShowAllItems() | Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false. |
setShowAllItems(boolean) | Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false. |
getNonAutoSortDefault() | Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort. |
setNonAutoSortDefault(boolean) | Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort. |
isAutoSort() | Indicates whether the specified PivotTable field is automatically sorted. |
setIsAutoSort(boolean) | Indicates whether the specified PivotTable field is automatically sorted. |
isAscendSort() | Indicates whether the specified PivotTable field is autosorted ascending. |
setIsAscendSort(boolean) | Indicates whether the specified PivotTable field is autosorted ascending. |
getAutoSortField() | Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields. |
setAutoSortField(number) | Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields. |
isAutoShow() | Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003. |
setIsAutoShow(boolean) | Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003. |
isAscendShow() | Indicates whether the specified PivotTable field is autoshown ascending. |
setIsAscendShow(boolean) | Indicates whether the specified PivotTable field is autoshown ascending. |
getAutoShowCount() | Represent the number of top or bottom items that are automatically shown in the specified PivotTable field. |
setAutoShowCount(number) | Represent the number of top or bottom items that are automatically shown in the specified PivotTable field. |
getAutoShowField() | Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields. |
setAutoShowField(number) | Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields. |
getFunction() | Represents the function used to summarize the PivotTable data field. |
setFunction(ConsolidationFunction) | Represents the function used to summarize the PivotTable data field. |
getShowValuesSetting() | Gets the settings of showing values as when the ShowDataAs calculation is in use. |
getDataDisplayFormat() | Represents how to display the values in a data field of the pivot report. |
setDataDisplayFormat(PivotFieldDataDisplayFormat) | Represents how to display the values in a data field of the pivot report. |
getBaseFieldIndex() | Represents the base field for a custom calculation when the ShowDataAs calculation is in use. |
setBaseFieldIndex(number) | Represents the base field for a custom calculation when the ShowDataAs calculation is in use. |
getBaseItemPosition() | Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute. |
setBaseItemPosition(PivotItemPosition) | Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute. |
getBaseItemIndex() | Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. |
setBaseItemIndex(number) | Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. |
getCurrentPageItem() | Represents the current page item showing for the page field (valid only for page fields). |
setCurrentPageItem(number) | Represents the current page item showing for the page field (valid only for page fields). |
getNumber() | Represents the built-in display format of numbers and dates. |
setNumber(number) | Represents the built-in display format of numbers and dates. |
getInsertBlankRow() | Indicates whether inserting blank line after each item. |
setInsertBlankRow(boolean) | Indicates whether inserting blank line after each item. |
getShowSubtotalAtTop() | when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom |
setShowSubtotalAtTop(boolean) | when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom |
getShowInOutlineForm() | Indicates whether layout this field in outline form on the Pivot Table view |
setShowInOutlineForm(boolean) | Indicates whether layout this field in outline form on the Pivot Table view |
get_NumberFormat() | Represents the custom display format of numbers and dates. |
setNumberFormat(string) | Represents the custom display format of numbers and dates. |
getItems() | Get all labels of pivot items in this field. |
getOriginalItems() | Get the original base items; |
getItemCount() | Gets the count of the base items in this pivot field. |
getShowCompact() | Indicates whether display labels from the next field in the same column on the Pivot Table view |
setShowCompact(boolean) | Indicates whether display labels from the next field in the same column on the Pivot Table view |
getPivotFilterByType(PivotFilterType) | Gets the pivot filter of the pivot field by type |
getFilters() | Gets all pivot filters of this pivot field. |
initPivotItems() | Init the pivot items of the pivot field |
groupBy(number, boolean) | Automatically group the field with internal |
groupBy(Date, Date, PivotGroupByType[], number, boolean) | Group the file by the date group types. |
groupBy(number, number, number, boolean) | Group the file by number. |
groupBy(CustomPiovtFieldGroupItem[], boolean) | Custom group the field. |
ungroup() | Ungroup the pivot field. |
getCalculatedFieldFormula() | Get the formula string of the specified calculated field . |
setSubtotals(PivotFieldSubtotalType, boolean) | Sets whether the specified field shows that subtotals. |
getSubtotals(PivotFieldSubtotalType) | Indicates whether showing specified subtotal. |
showValuesAs(PivotFieldDataDisplayFormat, number, PivotItemPositionType, number) | Shows values of data field as different display format when the ShowDataAs calculation is in use. |
isHiddenItem(number) | Gets whether the specific PivotItem is hidden. |
hideItem(number, boolean) | Sets whether the specific PivotItem in a data field is hidden. |
hideItem(string, boolean) | Sets whether the specific PivotItem in a data field is hidden. |
isHiddenItemDetail(number) | Gets whether hidding the detail of the specific PivotItem.. |
hideItemDetail(number, boolean) | Sets whether the specific PivotItem in a pivot field is hidden detail. |
hideDetail(boolean) | Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field. |
addCalculatedItem(string, string) | Add a calculated formula item to the pivot field. |
getPivotItems()
Gets the pivot items of the pivot field
getPivotItems() : PivotItemCollection;
Returns
getGroupSettings()
Gets the group settings of the pivot field.
getGroupSettings() : PivotFieldGroupSettings;
Returns
Remarks
If this field is not grouped, Null will be returned.
isCalculatedField()
Indicates whether the specified PivotTable field is calculated field.
isCalculatedField() : boolean;
getBaseIndex()
Represents the PivotField index in the base PivotFields.
getBaseIndex() : number;
setBaseIndex(number)
Represents the PivotField index in the base PivotFields.
setBaseIndex(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getPosition()
Represents the index of PivotField in the region.
getPosition() : number;
getName()
Represents the name of PivotField.
getName() : string;
setName(string)
Represents the name of PivotField.
setName(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getDisplayName()
Represents the PivotField display name.
getDisplayName() : string;
setDisplayName(string)
Represents the PivotField display name.
setDisplayName(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
isAutoSubtotals()
Indicates whether the specified field shows automatic subtotals. Default is true.
isAutoSubtotals() : boolean;
setIsAutoSubtotals(boolean)
Indicates whether the specified field shows automatic subtotals. Default is true.
setIsAutoSubtotals(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getDragToColumn()
Indicates whether the specified field can be dragged to the column position. The default value is true.
getDragToColumn() : boolean;
setDragToColumn(boolean)
Indicates whether the specified field can be dragged to the column position. The default value is true.
setDragToColumn(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getDragToHide()
Indicates whether the specified field can be dragged to the hide position. The default value is true.
getDragToHide() : boolean;
setDragToHide(boolean)
Indicates whether the specified field can be dragged to the hide position. The default value is true.
setDragToHide(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getDragToRow()
Indicates whether the specified field can be dragged to the row position. The default value is true.
getDragToRow() : boolean;
setDragToRow(boolean)
Indicates whether the specified field can be dragged to the row position. The default value is true.
setDragToRow(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getDragToPage()
Indicates whether the specified field can be dragged to the page position. The default value is true.
getDragToPage() : boolean;
setDragToPage(boolean)
Indicates whether the specified field can be dragged to the page position. The default value is true.
setDragToPage(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getDragToData()
Indicates whether the specified field can be dragged to the data position. The default value is true.
getDragToData() : boolean;
setDragToData(boolean)
Indicates whether the specified field can be dragged to the data position. The default value is true.
setDragToData(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isMultipleItemSelectionAllowed()
indicates whether the field can have multiple items selected in the page field The default value is false.
isMultipleItemSelectionAllowed() : boolean;
setIsMultipleItemSelectionAllowed(boolean)
indicates whether the field can have multiple items selected in the page field The default value is false.
setIsMultipleItemSelectionAllowed(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isRepeatItemLabels()
Indicates whether repeating labels of the field in the region. The default value is false.
isRepeatItemLabels() : boolean;
setIsRepeatItemLabels(boolean)
Indicates whether repeating labels of the field in the region. The default value is false.
setIsRepeatItemLabels(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isIncludeNewItemsInFilter()
Indicates whether including new items to the field in manual filter. The default value is false.
isIncludeNewItemsInFilter() : boolean;
setIsIncludeNewItemsInFilter(boolean)
Indicates whether including new items to the field in manual filter. The default value is false.
setIsIncludeNewItemsInFilter(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isInsertPageBreaksBetweenItems()
Indicates whether inserting page breaks after each item. The default value is false.
isInsertPageBreaksBetweenItems() : boolean;
setIsInsertPageBreaksBetweenItems(boolean)
Indicates whether inserting page breaks after each item. The default value is false.
setIsInsertPageBreaksBetweenItems(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getShowAllItems()
Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.
getShowAllItems() : boolean;
setShowAllItems(boolean)
Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.
setShowAllItems(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getNonAutoSortDefault()
Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.
getNonAutoSortDefault() : boolean;
setNonAutoSortDefault(boolean)
Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.
setNonAutoSortDefault(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isAutoSort()
Indicates whether the specified PivotTable field is automatically sorted.
isAutoSort() : boolean;
setIsAutoSort(boolean)
Indicates whether the specified PivotTable field is automatically sorted.
setIsAutoSort(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isAscendSort()
Indicates whether the specified PivotTable field is autosorted ascending.
isAscendSort() : boolean;
setIsAscendSort(boolean)
Indicates whether the specified PivotTable field is autosorted ascending.
setIsAscendSort(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getAutoSortField()
Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.
getAutoSortField() : number;
setAutoSortField(number)
Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.
setAutoSortField(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
isAutoShow()
Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
isAutoShow() : boolean;
setIsAutoShow(boolean)
Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
setIsAutoShow(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isAscendShow()
Indicates whether the specified PivotTable field is autoshown ascending.
isAscendShow() : boolean;
setIsAscendShow(boolean)
Indicates whether the specified PivotTable field is autoshown ascending.
setIsAscendShow(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getAutoShowCount()
Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.
getAutoShowCount() : number;
setAutoShowCount(number)
Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.
setAutoShowCount(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getAutoShowField()
Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
getAutoShowField() : number;
setAutoShowField(number)
Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
setAutoShowField(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getFunction()
Represents the function used to summarize the PivotTable data field.
getFunction() : ConsolidationFunction;
Returns
setFunction(ConsolidationFunction)
Represents the function used to summarize the PivotTable data field.
setFunction(value: ConsolidationFunction) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | ConsolidationFunction | The value to set. |
getShowValuesSetting()
Gets the settings of showing values as when the ShowDataAs calculation is in use.
getShowValuesSetting() : PivotShowValuesSetting;
Returns
getDataDisplayFormat()
Represents how to display the values in a data field of the pivot report.
getDataDisplayFormat() : PivotFieldDataDisplayFormat;
Returns
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.CalculationType property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
setDataDisplayFormat(PivotFieldDataDisplayFormat)
Represents how to display the values in a data field of the pivot report.
setDataDisplayFormat(value: PivotFieldDataDisplayFormat) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PivotFieldDataDisplayFormat | The value to set. |
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.CalculationType property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
getBaseFieldIndex()
Represents the base field for a custom calculation when the ShowDataAs calculation is in use.
getBaseFieldIndex() : number;
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.BaseFieldIndex property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
setBaseFieldIndex(number)
Represents the base field for a custom calculation when the ShowDataAs calculation is in use.
setBaseFieldIndex(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.BaseFieldIndex property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
getBaseItemPosition()
Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute.
getBaseItemPosition() : PivotItemPosition;
Returns
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.BaseItemType property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
setBaseItemPosition(PivotItemPosition)
Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute.
setBaseItemPosition(value: PivotItemPosition) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PivotItemPosition | The value to set. |
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.BaseItemType property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
getBaseItemIndex()
Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields.
getBaseItemIndex() : number;
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.BaseItemIndex property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
setBaseItemIndex(number)
Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields.
setBaseItemIndex(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
Remarks
NOTE: This property is now obsolete. Instead, please use PivotField.PivotShowValuesSetting.BaseItemIndex property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
getCurrentPageItem()
Represents the current page item showing for the page field (valid only for page fields).
getCurrentPageItem() : number;
setCurrentPageItem(number)
Represents the current page item showing for the page field (valid only for page fields).
setCurrentPageItem(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getNumber()
Represents the built-in display format of numbers and dates.
getNumber() : number;
setNumber(number)
Represents the built-in display format of numbers and dates.
setNumber(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getInsertBlankRow()
Indicates whether inserting blank line after each item.
getInsertBlankRow() : boolean;
setInsertBlankRow(boolean)
Indicates whether inserting blank line after each item.
setInsertBlankRow(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getShowSubtotalAtTop()
when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
getShowSubtotalAtTop() : boolean;
Remarks
Only works when ShowInOutlineForm is true.
setShowSubtotalAtTop(boolean)
when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
setShowSubtotalAtTop(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
Only works when ShowInOutlineForm is true.
getShowInOutlineForm()
Indicates whether layout this field in outline form on the Pivot Table view
getShowInOutlineForm() : boolean;
setShowInOutlineForm(boolean)
Indicates whether layout this field in outline form on the Pivot Table view
setShowInOutlineForm(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
get_NumberFormat()
Represents the custom display format of numbers and dates.
get_NumberFormat() : string;
setNumberFormat(string)
Represents the custom display format of numbers and dates.
setNumberFormat(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getItems()
Get all labels of pivot items in this field.
getItems() : string[];
Returns
string[]
getOriginalItems()
Get the original base items;
getOriginalItems() : string[];
Returns
string[]
getItemCount()
Gets the count of the base items in this pivot field.
getItemCount() : number;
getShowCompact()
Indicates whether display labels from the next field in the same column on the Pivot Table view
getShowCompact() : boolean;
setShowCompact(boolean)
Indicates whether display labels from the next field in the same column on the Pivot Table view
setShowCompact(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getPivotFilterByType(PivotFilterType)
Gets the pivot filter of the pivot field by type
getPivotFilterByType(type: PivotFilterType) : PivotFilter;
Parameters:
Parameter | Type | Description |
---|---|---|
type | PivotFilterType |
Returns
getFilters()
Gets all pivot filters of this pivot field.
getFilters() : PivotFilter[];
Returns
initPivotItems()
Init the pivot items of the pivot field
initPivotItems() : void;
groupBy(number, boolean)
Automatically group the field with internal
groupBy(interval: number, newField: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
interval | number | The internal of group. /// Automatic value will be assigned if it’s zero, |
newField | boolean | Indicates whether adding a new field to the pivottable. |
groupBy(Date, Date, PivotGroupByType[], number, boolean)
Group the file by the date group types.
groupBy(start: Date, end: Date, groups: PivotGroupByType[], interval: number, firstAsNewField: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
start | Date | The start datetime |
end | Date | The end of datetime |
groups | PivotGroupByType[] | Group types |
interval | number | The interval |
firstAsNewField | boolean | Indicates whether adding a new field to the pivottable. /// Only for the first group item. |
groupBy(number, number, number, boolean)
Group the file by number.
groupBy(start: number, end: number, interval: number, newField: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
start | number | The start value |
end | number | The end of value |
interval | number | The interval |
newField | boolean | Indicates whether adding a new field to the pivottable |
groupBy(CustomPiovtFieldGroupItem[], boolean)
Custom group the field.
groupBy(customGroupItems: CustomPiovtFieldGroupItem[], newField: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
customGroupItems | CustomPiovtFieldGroupItem[] | The custom group items. |
newField | boolean | Indicates whether adding a new field to the pivottable |
ungroup()
Ungroup the pivot field.
ungroup() : void;
getCalculatedFieldFormula()
Get the formula string of the specified calculated field .
getCalculatedFieldFormula() : string;
setSubtotals(PivotFieldSubtotalType, boolean)
Sets whether the specified field shows that subtotals.
setSubtotals(subtotalType: PivotFieldSubtotalType, shown: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
subtotalType | PivotFieldSubtotalType | subtotals type. |
shown | boolean | whether the specified field shows that subtotals. |
getSubtotals(PivotFieldSubtotalType)
Indicates whether showing specified subtotal.
getSubtotals(subtotalType: PivotFieldSubtotalType) : boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
subtotalType | PivotFieldSubtotalType | subtotal type. |
Returns
Returns whether showing specified subtotal.
showValuesAs(PivotFieldDataDisplayFormat, number, PivotItemPositionType, number)
Shows values of data field as different display format when the ShowDataAs calculation is in use.
showValuesAs(displayFormat: PivotFieldDataDisplayFormat, baseField: number, baseItemPositionType: PivotItemPositionType, baseItem: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
displayFormat | PivotFieldDataDisplayFormat | The data display format type. |
baseField | number | The index to the field which ShowDataAs calculation bases on. |
baseItemPositionType | PivotItemPositionType | The position type of base iteam. |
baseItem | number | The index to the base item which ShowDataAs calculation bases on. /// Only works when baseItemPositionType is custom. |
Remarks
Only for data field.
isHiddenItem(number)
Gets whether the specific PivotItem is hidden.
isHiddenItem(index: number) : boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number | The index of the pivotItem in the pivotField. |
Returns
whether the specific PivotItem is hidden
hideItem(number, boolean)
Sets whether the specific PivotItem in a data field is hidden.
hideItem(index: number, isHidden: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number | the index of the pivotItem in the pivotField. |
isHidden | boolean | whether the specific PivotItem is hidden |
hideItem(string, boolean)
Sets whether the specific PivotItem in a data field is hidden.
hideItem(itemValue: string, isHidden: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
itemValue | string | the value of the pivotItem in the pivotField. |
isHidden | boolean | whether the specific PivotItem is hidden |
isHiddenItemDetail(number)
Gets whether hidding the detail of the specific PivotItem..
isHiddenItemDetail(index: number) : boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number | The index of the pivotItem in the pivotField. |
Returns
whether the specific PivotItem is hidden detail
hideItemDetail(number, boolean)
Sets whether the specific PivotItem in a pivot field is hidden detail.
hideItemDetail(index: number, isHiddenDetail: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number | the index of the pivotItem in the pivotField. |
isHiddenDetail | boolean | whether the specific PivotItem is hidden |
hideDetail(boolean)
Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field.
hideDetail(isHiddenDetail: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
isHiddenDetail | boolean | Whether hide the detail of the pivot field. |
addCalculatedItem(string, string)
Add a calculated formula item to the pivot field.
addCalculatedItem(name: string, formula: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
name | string | The item’s name. |
formula | string | The formula of pivot item. |
Remarks
Only supports to add calculated item to Row/Column field.