FSheetPivotChart
A live PivotChart hosted by a worksheet.
The Chart visual and Drawing placement belong to this PivotChart. The effective Pivot report belongs either to this chart (range source) or to the referenced PivotTable (linked source). Linked PivotCharts therefore share field, filter, sort, Show Values As, and collapse changes.
Access
Access through:
FWorkbook.getPivotChartById()FWorksheet.insertPivotChart()FWorksheet.getPivotChart()FWorksheet.getPivotCharts()
Example
Create an owned PivotChart
import '@univerjs-pro/sheets-pivot-chart/facade'const fWorkbook = univerAPI.getActiveWorkbook()const fWorksheet = fWorkbook.getSheetByName('Sales')const info = fWorksheet .newPivotChart(univerAPI.Enum.ChartTypeString.Column) .setSource('A1:G100') .setPosition('J2') .setSize(640, 360) .setTitle('Sales by region') .build()const fPivotChart = await fWorksheet.insertPivotChart(info)const sourceFields = fPivotChart.getSourceFieldsInfo()await fPivotChart.addField(sourceFields[0].id, univerAPI.Enum.PivotTableFiledAreaEnum.Row, 0)await fPivotChart.addField(sourceFields[5].id, univerAPI.Enum.PivotTableFiledAreaEnum.Value, 0)Link multiple PivotCharts to one PivotTable
import '@univerjs-pro/sheets-pivot-chart/facade'const fWorkbook = univerAPI.getActiveWorkbook()const fWorksheet = fWorkbook.getSheetByName('Dashboard')const fPivotTable = fWorkbook.getPivotTableById('pivot-table-1')if (!fWorksheet || !fPivotTable) throw new Error('Pivot source is unavailable.')const first = await fWorksheet.insertPivotChart( fPivotTable.newChart(univerAPI.Enum.ChartTypeString.Column).setPosition('A1').build(),)const second = await fWorksheet.insertPivotChart( fPivotTable.newChart(univerAPI.Enum.ChartTypeString.Line).setPosition('J1').build(),)const rowFieldId = first.getFieldIdsByArea(univerAPI.Enum.PivotTableFiledAreaEnum.Row)[0]await first.setLabelSort(rowFieldId, { type: univerAPI.Enum.PivotDataFieldSortOperatorEnum.ascending,})console.log(second.getFieldsConfig()) // Reads the same PivotTable-owned report.Configure Show Values As and a value filter
const rowFieldId = fPivotChart.getFieldIdsByArea(univerAPI.Enum.PivotTableFiledAreaEnum.Row)[0]const valueFieldId = fPivotChart.getFieldIdsByArea(univerAPI.Enum.PivotTableFiledAreaEnum.Value)[0]await fPivotChart.setShowDataAs(valueFieldId, { type: univerAPI.Enum.PivotShowAsTypeEnum.percentOfGrandTotal, baseFieldId: '', baseItem: '',})await fPivotChart.setValueFilter(rowFieldId, { operator: univerAPI.Enum.PivotFilterOperatorEnum.valueGreaterThan, expected: 1000, valueFieldId,})Handle an unavailable linked PivotTable
if (fPivotChart.isLinkedToPivotTable() && !fPivotChart.getPivotTable()) { // Report writes resolve to false until the same PivotTable ID becomes available again. console.log(await fPivotChart.resetFields()) // Per-chart visual changes remain available. fPivotChart.setTheme('default')}Setup
Register @univerjs-pro/sheets-pivot-chart or a preset that includes it. In plugin mode, import @univerjs-pro/sheets-pivot-chart/facade. Additional methods below require their listed plugin packages. See Facade setup.
@univerjs-pro/sheets-pivot-chart
FSheetPivotChart.addField
Adds one source field to a report area.
addField(dataFieldIdOrIndex: string | number, area: PivotTableFiledAreaEnum, index: number): Promise<boolean>Parameters
dataFieldIdOrIndex— Required. A source-field identifier or zero-based source index.area— Required. The target report area.index— Required. The zero-based target index.
Returns
Whether the field was added.
Types: Promise · PivotTableFiledAreaEnum
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.bringForward
Moves this PivotChart forward by one level.
bringForward(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.bringToFront
Moves this PivotChart to the front.
bringToFront(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearAppearance
Clears all or one common Chart appearance property.
clearAppearance(target?: ChartAppearanceTarget): thisParameters
target— Optional. The property to clear; omit it to clear all appearance overrides.
Returns
This PivotChart for chaining.
Types: ChartAppearanceTarget
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearLabelSort
Clears label sorting for a row or column field.
clearLabelSort(fieldId: string): Promise<boolean>Parameters
fieldId— Required. The row or column table-field identifier.
Returns
Whether sorting was cleared.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearLegend
Clears the Chart legend.
clearLegend(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearPalette
Clears the explicit series palette.
clearPalette(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearSubtitle
Clears the Chart subtitle.
clearSubtitle(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearTheme
Clears the Chart theme.
clearTheme(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearTitle
Clears the Chart title.
clearTitle(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.clearValueFilter
Removes the value filter owned by a row or column field.
clearValueFilter(fieldId: string): Promise<boolean>Parameters
fieldId— Required. The row or column table-field identifier.
Returns
Whether the value filter was removed.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getControls
Returns resolved PivotChart button visibility controls.
getControls(): DeepReadonly<IPivotChartControls>Returns
A defensive resolved controls snapshot.
Types: IPivotChartControls · DeepReadonly
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getFieldIdsByArea
Returns table-field identifiers in one report area.
getFieldIdsByArea(area: PivotTableFiledAreaEnum): string[]Parameters
area— Required. The Pivot report area.
Returns
Table-field identifiers in display order.
Types: PivotTableFiledAreaEnum
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getFieldsConfig
Returns the current effective report fields configuration.
getFieldsConfig(): DeepReadonly<IPivotTableSnapshot> | undefinedReturns
A defensive report snapshot, if available.
Types: DeepReadonly · IPivotTableSnapshot
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getFieldSetting
Returns one report field setting.
getFieldSetting(fieldId: string): IPivotTableValueFieldJSON | IPivotTableLabelFieldJSON | undefinedParameters
fieldId— Required. The table-field identifier.
Returns
A defensive field snapshot.
Types: IPivotTableValueFieldJSON · IPivotTableLabelFieldJSON
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getId
Returns the stable identifier of this PivotChart.
getId(): stringReturns
The PivotChart identifier.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getInfo
Returns detached information that can be inspected, copied, or passed to update.
getInfo(): DeepReadonly<ISheetPivotChartInfo>Returns
A defensive PivotChart snapshot.
Types: ISheetPivotChartInfo · DeepReadonly
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getPivotTable
Returns a live facade for the referenced PivotTable.
getPivotTable(): FPivotTable | nullReturns
The shared PivotTable, or null while the reference is unavailable.
Types: FPivotTable
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getPivotTableReference
Returns the stable linked PivotTable reference.
getPivotTableReference(): DeepReadonly<IPivotChartPivotTableReference> | undefinedReturns
The reference for linked charts.
Types: DeepReadonly · IPivotChartPivotTableReference
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getShowDataAs
Returns the Show Values As rule for a value field.
getShowDataAs(fieldId: string): IPivotTableShowDataAsInfo | undefinedParameters
fieldId— Required. The value table-field identifier.
Returns
A defensive rule snapshot.
Types: IPivotTableShowDataAsInfo
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getSourceFieldsInfo
Returns source fields available to the effective Pivot report.
getSourceFieldsInfo(): IPivotChartDataFieldInfo[]Returns
Defensive field information in source order.
Types: IPivotChartDataFieldInfo
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getSourceKind
Returns whether this PivotChart owns a range report or references a PivotTable.
getSourceKind(): PivotChartSourceKindReturns
The current source ownership kind.
Types: PivotChartSourceKind
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getSourceRangeInfo
Returns the effective source range for owned and available linked reports.
getSourceRangeInfo(): IUnitRangeNameWithSubUnitId | undefinedReturns
A defensive range snapshot, if available.
Types: IUnitRangeNameWithSubUnitId
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getType
Returns the current PivotChart type.
getType(): PivotChartTypeStringReturns
The supported Chart type.
Types: PivotChartTypeString
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getValueFilter
Returns the value filter owned by a row or column field.
getValueFilter(fieldId: string): IPivotTableValueFilter | undefinedParameters
fieldId— Required. The row or column table-field identifier.
Returns
A defensive filter snapshot.
Types: IPivotTableValueFilter
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.getValueFilters
Returns value filters in evaluation order.
getValueFilters(): IValueFilterInfoItem[]Returns
Defensive ordered filter snapshots.
Types: IValueFilterInfoItem
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.isLinkedToPivotTable
Returns whether this PivotChart shares a PivotTable-owned report.
isLinkedToPivotTable(): booleanReturns
true for a linked PivotChart.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.pivotChartId
The stable identifier of this PivotChart.
readonly pivotChartId: stringPackage: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.remove
Removes this PivotChart and its worksheet Drawing.
remove(): Promise<boolean>Returns
Whether the removal was accepted.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.removeField
Removes report fields by their table-field identifiers.
removeField(fieldIds: string[]): Promise<boolean>Parameters
fieldIds— Required. The table-field identifiers to remove together.
Returns
Whether the fields were removed.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.renameField
Renames a report field.
renameField(fieldId: string, name: string): Promise<boolean>Parameters
fieldId— Required. The table-field identifier.name— Required. The new display name.
Returns
Whether the field was renamed.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.resetAutoGradientFill
Restores the default automatic-gradient behavior.
resetAutoGradientFill(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.resetFields
Removes all fields or only fields in one report area.
resetFields(area?: PivotTableFiledAreaEnum): Promise<boolean>Parameters
area— Optional. The area to clear; omit it to clear all report fields.
Returns
Whether the report update was accepted.
Types: Promise · PivotTableFiledAreaEnum
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.resetInvalidValueStrategy
Restores the default invalid-value strategy.
resetInvalidValueStrategy(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.resetShowDataAs
Restores normal value display for a value field.
resetShowDataAs(fieldId: string): Promise<boolean>Parameters
fieldId— Required. The value table-field identifier.
Returns
Whether the rule was reset.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.sendBackward
Moves this PivotChart backward by one level.
sendBackward(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.sendToBack
Moves this PivotChart to the back.
sendToBack(): thisReturns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setAbsolutePosition
Sets the absolute worksheet Drawing position.
setAbsolutePosition(x: number, y: number): thisParameters
x— Required. The horizontal position in pixels.y— Required. The vertical position in pixels.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setAppearance
Sets common Chart appearance.
setAppearance(value: IChartAppearanceSpec): thisParameters
value— Required. The appearance overrides.
Returns
This PivotChart for chaining.
Types: IChartAppearanceSpec
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setAutoGradientFill
Enables or disables automatic gradient fill.
setAutoGradientFill(value: boolean): thisParameters
value— Required. Whether automatic gradients are enabled.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setCategoryLevel
Expands the category hierarchy through the requested row field.
setCategoryLevel(fieldId: string): Promise<boolean>Parameters
fieldId— Required. The deepest row table-field identifier to display.
Returns
Whether the category level was updated.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setCollapse
Collapses or expands a row hierarchy field or one item.
setCollapse(fieldId: string, collapse: boolean, item?: string): Promise<boolean>Parameters
fieldId— Required. The row table-field identifier.collapse— Required. Whether to collapse the target.item— Optional. An optional item key; omit it to target the whole field.
Returns
Whether the hierarchy state was updated.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setControls
Merges PivotChart button visibility controls.
setControls(controls: Partial<IPivotChartControls>): thisParameters
controls— Required. The controls to override.
Returns
This PivotChart for chaining.
Types: Partial · IPivotChartControls
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setDateGroupType
Groups a row or column date field using a Pivot date interval.
setDateGroupType(fieldId: string, dateType: PivotDateGroupFieldDateTypeEnum): Promise<boolean>Parameters
fieldId— Required. The source date or existing date-group table-field identifier.dateType— Required. The requested date interval.
Returns
Whether the date group was updated.
Types: Promise · PivotDateGroupFieldDateTypeEnum
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setExpandCollapseButtonsVisible
Shows or hides category hierarchy expand and collapse buttons.
setExpandCollapseButtonsVisible(visible: boolean): thisParameters
visible— Required. Whether expand and collapse buttons are visible.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setFieldButtonsVisible
Shows or hides all Pivot field buttons.
setFieldButtonsVisible(visible: boolean): thisParameters
visible— Required. Whether field buttons are visible.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setFieldsConfig
Replaces all report fields in one command and one Pivot query.
setFieldsConfig(config: IPivotTableSnapshot): Promise<boolean>Parameters
config— Required. The complete fields configuration.
Returns
Whether the report update was accepted.
Types: Promise · IPivotTableSnapshot
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setFieldSetting
Updates a report field display name, format, aggregation, or Show Values As rule.
setFieldSetting(fieldId: string, setting: IPivotChartFieldSettingOptions): Promise<boolean>Parameters
fieldId— Required. The table-field identifier.setting— Required. The field properties to update together.
Returns
Whether the field setting was updated.
Types: Promise · IPivotChartFieldSettingOptions
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setInvalidValueStrategy
Sets how invalid Pivot values are rendered.
setInvalidValueStrategy(value: InvalidValueType): thisParameters
value— Required. The invalid-value strategy.
Returns
This PivotChart for chaining.
Types: InvalidValueType
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setLabelManualFilter
Sets a manual label filter for a report field.
setLabelManualFilter(fieldId: string, items: string[], isAll?: boolean): Promise<boolean>Parameters
fieldId— Required. The table-field identifier.items— Required. The selected item keys.isAll— Optional. Whether all current items are selected.
Returns
Whether the filter was updated.
Types: Promise
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setLabelSort
Sets label sorting for a row or column field.
setLabelSort(fieldId: string, info: IPivotTableSortInfo): Promise<boolean>Parameters
fieldId— Required. The row or column table-field identifier.info— Required. The sort rule.
Returns
Whether sorting was updated.
Types: Promise · IPivotTableSortInfo
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setLegend
Sets the Chart legend.
setLegend(value: ChartLegendSpec): thisParameters
value— Required. The legend specification.
Returns
This PivotChart for chaining.
Types: ChartLegendSpec
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setPalette
Sets an explicit series palette.
setPalette(colors: readonly string[]): thisParameters
colors— Required. The series colors.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setPosition
Sets the worksheet cell anchor of this PivotChart.
setPosition(anchor: ChartAnchorSpec): thisParameters
anchor— Required. A1 notation or a zero-based row and column anchor.
Returns
This PivotChart for chaining.
Types: ChartAnchorSpec
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setShowDataAs
Sets the Show Values As rule for a value field.
setShowDataAs(fieldId: string, value: IPivotTableShowDataAsInfo): Promise<boolean>Parameters
fieldId— Required. The value table-field identifier.value— Required. The Show Values As rule.
Returns
Whether the rule was updated.
Types: Promise · IPivotTableShowDataAsInfo
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setSize
Sets the worksheet Drawing size.
setSize(width: number, height: number): thisParameters
width— Required. The width in pixels.height— Required. The height in pixels.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setSourceRange
Updates the effective report source without changing its ownership mode.
Linked PivotCharts delegate this operation to their referenced PivotTable.
setSourceRange(source: IUnitRangeNameWithSubUnitId): Promise<boolean>Parameters
source— Required. The complete source range identity.
Returns
Whether the source update was accepted.
Types: Promise · IUnitRangeNameWithSubUnitId
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setSubtitle
Sets the Chart subtitle.
setSubtitle(value: ChartSubtitleSpec): thisParameters
value— Required. The subtitle specification.
Returns
This PivotChart for chaining.
Types: ChartSubtitleSpec
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setTheme
Sets the Chart theme.
setTheme(name: string): thisParameters
name— Required. The registered theme name.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setTitle
Sets the Chart title.
setTitle(value: ChartTitleSpec): thisParameters
value— Required. The title specification.
Returns
This PivotChart for chaining.
Types: ChartTitleSpec
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setType
Sets the current supported Chart type.
setType(type: PivotChartTypeString): thisParameters
type— Required. The target supported type.
Returns
This PivotChart for chaining.
Throws
If the type is not supported by PivotChart.
Types: PivotChartTypeString
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setValueFilter
Sets, replaces, or removes the value filter owned by a row or column field.
setValueFilter(fieldId: string, filter?: Omit<IPivotTableValueFilter, 'type'>): Promise<boolean>Parameters
fieldId— Required. The row or column table-field identifier.filter— Optional. The rule, orundefinedto remove it.
Returns
Whether the value filter was updated.
Types: Promise · Omit · IPivotTableValueFilter
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.setZOrder
Moves this PivotChart to a zero-based Drawing order index.
setZOrder(index: number): thisParameters
index— Required. The target zero-based z-order index.
Returns
This PivotChart for chaining.
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.subUnitId
The worksheet identifier that hosts this PivotChart.
readonly subUnitId: stringPackage: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.toBuilder
Creates a detached, source-locked Builder prefilled from this PivotChart.
toBuilder(): FBoundSheetPivotChartBuilderOf<PivotChartTypeString>toBuilder<T extends PivotChartTypeString>(type: T): FBoundSheetPivotChartBuilderOf<T>Parameters
type— Optional. The target supported Chart type.
Returns
A source-locked Builder.
A source-locked Builder for the target type.
Types: PivotChartTypeString · FBoundSheetPivotChartBuilderOf
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.unitId
The workbook identifier that owns this PivotChart.
readonly unitId: stringPackage: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.update
Atomically updates visual configuration, controls, name, and placement.
The source mode, source identity, and live PivotModel are locked. Use setSourceRange
or the field APIs for report changes.
update(info: ISheetPivotChartInfo): Promise<this>Parameters
info— Required. Detached information created bygetInfoortoBuilder.
Returns
This live PivotChart after the command is accepted.
Throws
If the source, report fields, Chart type, or Drawing layout is invalid.
Types: Promise · ISheetPivotChartInfo
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.updateFieldPosition
Moves one report field to a zero-based area index.
updateFieldPosition(fieldId: string, area: PivotTableFiledAreaEnum, index: number): Promise<boolean>Parameters
fieldId— Required. The table-field identifier.area— Required. The target area.index— Required. The zero-based target index.
Returns
Whether the field was moved.
Types: Promise · PivotTableFiledAreaEnum
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
FSheetPivotChart.updateValuePosition
Moves the synthetic multiple-values field.
updateValuePosition(position: PivotTableValuePositionEnum, index: number): Promise<boolean>Parameters
position— Required. The row, column, or absent position.index— Required. The zero-based row or column field index.
Returns
Whether the value position was updated.
Types: Promise · PivotTableValuePositionEnum
Package: @univerjs-pro/sheets-pivot-chart · Type definitions
How is this guide?