# FSheetPivotChart

> Language fallback: requested `zh-CN`; content is `en-US`.

- Human documentation: [https://docs.univer.ai/zh-CN/reference/facade/sheet-pivot-chart](https://docs.univer.ai/zh-CN/reference/facade/sheet-pivot-chart)

- Agent Markdown: [https://docs.univer.ai/zh-CN/reference/facade/sheet-pivot-chart.md](https://docs.univer.ai/zh-CN/reference/facade/sheet-pivot-chart.md)

- Requested language: `zh-CN`

- Content language: `en-US`

- Documentation version: `1.0.0`

- Source: [facade/sheet-pivot-chart.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/facade/sheet-pivot-chart.mdx)

---

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()`](https://docs.univer.ai/zh-CN/reference/facade/workbook.md#getpivotchartbyid)
* [`FWorksheet.insertPivotChart()`](https://docs.univer.ai/zh-CN/reference/facade/worksheet.md#insertpivotchart)
* [`FWorksheet.getPivotChart()`](https://docs.univer.ai/zh-CN/reference/facade/worksheet.md#getpivotchart)
* [`FWorksheet.getPivotCharts()`](https://docs.univer.ai/zh-CN/reference/facade/worksheet.md#getpivotcharts)

## Example

Create an owned PivotChart

```ts
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

```ts
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

```ts
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

```ts
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`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) 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](https://docs.univer.ai/zh-CN/guides/sheets/getting-started/facade.md).

## `@univerjs-pro/sheets-pivot-chart`

### `FSheetPivotChart.addField`

Adds one source field to a report area.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`PivotTableFiledAreaEnum`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/enum.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.bringForward`

Moves this PivotChart forward by one level.

```typescript
bringForward(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.bringToFront`

Moves this PivotChart to the front.

```typescript
bringToFront(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearAppearance`

Clears all or one common Chart appearance property.

```typescript
clearAppearance(target?: ChartAppearanceTarget): this
```

**Parameters**

* `target` — Optional. The property to clear; omit it to clear all appearance overrides.

**Returns**

This PivotChart for chaining.

**Types:** [`ChartAppearanceTarget`](https://unpkg.com/@univerjs-pro/engine-chart@1.0.0-rc.0/lib/types/chart-builder/configuration/appearance.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearLabelSort`

Clears label sorting for a row or column field.

```typescript
clearLabelSort(fieldId: string): Promise<boolean>
```

**Parameters**

* `fieldId` — Required. The row or column table-field identifier.

**Returns**

Whether sorting was cleared.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearLegend`

Clears the Chart legend.

```typescript
clearLegend(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearPalette`

Clears the explicit series palette.

```typescript
clearPalette(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearSubtitle`

Clears the Chart subtitle.

```typescript
clearSubtitle(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearTheme`

Clears the Chart theme.

```typescript
clearTheme(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearTitle`

Clears the Chart title.

```typescript
clearTitle(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.clearValueFilter`

Removes the value filter owned by a row or column field.

```typescript
clearValueFilter(fieldId: string): Promise<boolean>
```

**Parameters**

* `fieldId` — Required. The row or column table-field identifier.

**Returns**

Whether the value filter was removed.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getControls`

Returns resolved PivotChart button visibility controls.

```typescript
getControls(): DeepReadonly<IPivotChartControls>
```

**Returns**

A defensive resolved controls snapshot.

**Types:** [`IPivotChartControls`](https://unpkg.com/@univerjs-pro/pivot-chart@1.0.0-rc.0/lib/types/definition.d.ts) · [`DeepReadonly`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/shared/types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getFieldIdsByArea`

Returns table-field identifiers in one report area.

```typescript
getFieldIdsByArea(area: PivotTableFiledAreaEnum): string[]
```

**Parameters**

* `area` — Required. The Pivot report area.

**Returns**

Table-field identifiers in display order.

**Types:** [`PivotTableFiledAreaEnum`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/enum.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getFieldsConfig`

Returns the current effective report fields configuration.

```typescript
getFieldsConfig(): DeepReadonly<IPivotTableSnapshot> | undefined
```

**Returns**

A defensive report snapshot, if available.

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/shared/types.d.ts) · [`IPivotTableSnapshot`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/json-types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getFieldSetting`

Returns one report field setting.

```typescript
getFieldSetting(fieldId: string): IPivotTableValueFieldJSON | IPivotTableLabelFieldJSON | undefined
```

**Parameters**

* `fieldId` — Required. The table-field identifier.

**Returns**

A defensive field snapshot.

**Types:** [`IPivotTableValueFieldJSON`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/json-types.d.ts) · [`IPivotTableLabelFieldJSON`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/json-types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getId`

Returns the stable identifier of this PivotChart.

```typescript
getId(): string
```

**Returns**

The PivotChart identifier.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getInfo`

Returns detached information that can be inspected, copied, or passed to `update`.

```typescript
getInfo(): DeepReadonly<ISheetPivotChartInfo>
```

**Returns**

A defensive PivotChart snapshot.

**Types:** [`ISheetPivotChartInfo`](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/types.d.ts) · [`DeepReadonly`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/shared/types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getPivotTable`

Returns a live facade for the referenced PivotTable.

```typescript
getPivotTable(): FPivotTable | null
```

**Returns**

The shared PivotTable, or `null` while the reference is unavailable.

**Types:** [`FPivotTable`](https://docs.univer.ai/zh-CN/reference/facade/pivot-table.md)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getPivotTableReference`

Returns the stable linked PivotTable reference.

```typescript
getPivotTableReference(): DeepReadonly<IPivotChartPivotTableReference> | undefined
```

**Returns**

The reference for linked charts.

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/shared/types.d.ts) · [`IPivotChartPivotTableReference`](https://unpkg.com/@univerjs-pro/pivot-chart@1.0.0-rc.0/lib/types/definition.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getShowDataAs`

Returns the Show Values As rule for a value field.

```typescript
getShowDataAs(fieldId: string): IPivotTableShowDataAsInfo | undefined
```

**Parameters**

* `fieldId` — Required. The value table-field identifier.

**Returns**

A defensive rule snapshot.

**Types:** [`IPivotTableShowDataAsInfo`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/interface.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getSourceFieldsInfo`

Returns source fields available to the effective Pivot report.

```typescript
getSourceFieldsInfo(): IPivotChartDataFieldInfo[]
```

**Returns**

Defensive field information in source order.

**Types:** [`IPivotChartDataFieldInfo`](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getSourceKind`

Returns whether this PivotChart owns a range report or references a PivotTable.

```typescript
getSourceKind(): PivotChartSourceKind
```

**Returns**

The current source ownership kind.

**Types:** [`PivotChartSourceKind`](https://unpkg.com/@univerjs-pro/pivot-chart@1.0.0-rc.0/lib/types/definition.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getSourceRangeInfo`

Returns the effective source range for owned and available linked reports.

```typescript
getSourceRangeInfo(): IUnitRangeNameWithSubUnitId | undefined
```

**Returns**

A defensive range snapshot, if available.

**Types:** [`IUnitRangeNameWithSubUnitId`](https://unpkg.com/@univerjs-pro/sheets-pivot@1.0.0-rc.0/lib/types/const/type.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getType`

Returns the current PivotChart type.

```typescript
getType(): PivotChartTypeString
```

**Returns**

The supported Chart type.

**Types:** [`PivotChartTypeString`](https://unpkg.com/@univerjs-pro/pivot-chart@1.0.0-rc.0/lib/types/chart-type.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getValueFilter`

Returns the value filter owned by a row or column field.

```typescript
getValueFilter(fieldId: string): IPivotTableValueFilter | undefined
```

**Parameters**

* `fieldId` — Required. The row or column table-field identifier.

**Returns**

A defensive filter snapshot.

**Types:** [`IPivotTableValueFilter`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/interface.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.getValueFilters`

Returns value filters in evaluation order.

```typescript
getValueFilters(): IValueFilterInfoItem[]
```

**Returns**

Defensive ordered filter snapshots.

**Types:** [`IValueFilterInfoItem`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/interface.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.isLinkedToPivotTable`

Returns whether this PivotChart shares a PivotTable-owned report.

```typescript
isLinkedToPivotTable(): boolean
```

**Returns**

`true` for a linked PivotChart.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.pivotChartId`

The stable identifier of this PivotChart.

```typescript
readonly pivotChartId: string
```

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.remove`

Removes this PivotChart and its worksheet Drawing.

```typescript
remove(): Promise<boolean>
```

**Returns**

Whether the removal was accepted.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.removeField`

Removes report fields by their table-field identifiers.

```typescript
removeField(fieldIds: string[]): Promise<boolean>
```

**Parameters**

* `fieldIds` — Required. The table-field identifiers to remove together.

**Returns**

Whether the fields were removed.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.renameField`

Renames a report field.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.resetAutoGradientFill`

Restores the default automatic-gradient behavior.

```typescript
resetAutoGradientFill(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.resetFields`

Removes all fields or only fields in one report area.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`PivotTableFiledAreaEnum`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/enum.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.resetInvalidValueStrategy`

Restores the default invalid-value strategy.

```typescript
resetInvalidValueStrategy(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.resetShowDataAs`

Restores normal value display for a value field.

```typescript
resetShowDataAs(fieldId: string): Promise<boolean>
```

**Parameters**

* `fieldId` — Required. The value table-field identifier.

**Returns**

Whether the rule was reset.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.sendBackward`

Moves this PivotChart backward by one level.

```typescript
sendBackward(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.sendToBack`

Moves this PivotChart to the back.

```typescript
sendToBack(): this
```

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setAbsolutePosition`

Sets the absolute worksheet Drawing position.

```typescript
setAbsolutePosition(x: number, y: number): this
```

**Parameters**

* `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`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setAppearance`

Sets common Chart appearance.

```typescript
setAppearance(value: IChartAppearanceSpec): this
```

**Parameters**

* `value` — Required. The appearance overrides.

**Returns**

This PivotChart for chaining.

**Types:** [`IChartAppearanceSpec`](https://unpkg.com/@univerjs-pro/engine-chart@1.0.0-rc.0/lib/types/chart-builder/chart-types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setAutoGradientFill`

Enables or disables automatic gradient fill.

```typescript
setAutoGradientFill(value: boolean): this
```

**Parameters**

* `value` — Required. Whether automatic gradients are enabled.

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setCategoryLevel`

Expands the category hierarchy through the requested row field.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setCollapse`

Collapses or expands a row hierarchy field or one item.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setControls`

Merges PivotChart button visibility controls.

```typescript
setControls(controls: Partial<IPivotChartControls>): this
```

**Parameters**

* `controls` — Required. The controls to override.

**Returns**

This PivotChart for chaining.

**Types:** [`Partial`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`IPivotChartControls`](https://unpkg.com/@univerjs-pro/pivot-chart@1.0.0-rc.0/lib/types/definition.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setDateGroupType`

Groups a row or column date field using a Pivot date interval.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`PivotDateGroupFieldDateTypeEnum`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/enum.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setExpandCollapseButtonsVisible`

Shows or hides category hierarchy expand and collapse buttons.

```typescript
setExpandCollapseButtonsVisible(visible: boolean): this
```

**Parameters**

* `visible` — Required. Whether expand and collapse buttons are visible.

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setFieldButtonsVisible`

Shows or hides all Pivot field buttons.

```typescript
setFieldButtonsVisible(visible: boolean): this
```

**Parameters**

* `visible` — Required. Whether field buttons are visible.

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setFieldsConfig`

Replaces all report fields in one command and one Pivot query.

```typescript
setFieldsConfig(config: IPivotTableSnapshot): Promise<boolean>
```

**Parameters**

* `config` — Required. The complete fields configuration.

**Returns**

Whether the report update was accepted.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`IPivotTableSnapshot`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/json-types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setFieldSetting`

Updates a report field display name, format, aggregation, or Show Values As rule.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`IPivotChartFieldSettingOptions`](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setInvalidValueStrategy`

Sets how invalid Pivot values are rendered.

```typescript
setInvalidValueStrategy(value: InvalidValueType): this
```

**Parameters**

* `value` — Required. The invalid-value strategy.

**Returns**

This PivotChart for chaining.

**Types:** [`InvalidValueType`](https://unpkg.com/@univerjs-pro/engine-chart@1.0.0-rc.0/lib/types/enum.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setLabelManualFilter`

Sets a manual label filter for a report field.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setLabelSort`

Sets label sorting for a row or column field.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`IPivotTableSortInfo`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/interface.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setLegend`

Sets the Chart legend.

```typescript
setLegend(value: ChartLegendSpec): this
```

**Parameters**

* `value` — Required. The legend specification.

**Returns**

This PivotChart for chaining.

**Types:** [`ChartLegendSpec`](https://unpkg.com/@univerjs-pro/engine-chart@1.0.0-rc.0/lib/types/chart-builder/chart-types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setPalette`

Sets an explicit series palette.

```typescript
setPalette(colors: readonly string[]): this
```

**Parameters**

* `colors` — Required. The series colors.

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setPosition`

Sets the worksheet cell anchor of this PivotChart.

```typescript
setPosition(anchor: ChartAnchorSpec): this
```

**Parameters**

* `anchor` — Required. A1 notation or a zero-based row and column anchor.

**Returns**

This PivotChart for chaining.

**Types:** [`ChartAnchorSpec`](https://unpkg.com/@univerjs-pro/sheets-chart@1.0.0-rc.0/lib/types/chart-builder/types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setShowDataAs`

Sets the Show Values As rule for a value field.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`IPivotTableShowDataAsInfo`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/interface.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setSize`

Sets the worksheet Drawing size.

```typescript
setSize(width: number, height: number): this
```

**Parameters**

* `width` — Required. The width in pixels.
* `height` — Required. The height in pixels.

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setSourceRange`

Updates the effective report source without changing its ownership mode.

Linked PivotCharts delegate this operation to their referenced PivotTable.

```typescript
setSourceRange(source: IUnitRangeNameWithSubUnitId): Promise<boolean>
```

**Parameters**

* `source` — Required. The complete source range identity.

**Returns**

Whether the source update was accepted.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`IUnitRangeNameWithSubUnitId`](https://unpkg.com/@univerjs-pro/sheets-pivot@1.0.0-rc.0/lib/types/const/type.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setSubtitle`

Sets the Chart subtitle.

```typescript
setSubtitle(value: ChartSubtitleSpec): this
```

**Parameters**

* `value` — Required. The subtitle specification.

**Returns**

This PivotChart for chaining.

**Types:** [`ChartSubtitleSpec`](https://unpkg.com/@univerjs-pro/engine-chart@1.0.0-rc.0/lib/types/chart-builder/chart-types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setTheme`

Sets the Chart theme.

```typescript
setTheme(name: string): this
```

**Parameters**

* `name` — Required. The registered theme name.

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setTitle`

Sets the Chart title.

```typescript
setTitle(value: ChartTitleSpec): this
```

**Parameters**

* `value` — Required. The title specification.

**Returns**

This PivotChart for chaining.

**Types:** [`ChartTitleSpec`](https://unpkg.com/@univerjs-pro/engine-chart@1.0.0-rc.0/lib/types/chart-builder/chart-types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setType`

Sets the current supported Chart type.

```typescript
setType(type: PivotChartTypeString): this
```

**Parameters**

* `type` — Required. The target supported type.

**Returns**

This PivotChart for chaining.

**Throws**

If the type is not supported by PivotChart.

**Types:** [`PivotChartTypeString`](https://unpkg.com/@univerjs-pro/pivot-chart@1.0.0-rc.0/lib/types/chart-type.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setValueFilter`

Sets, replaces, or removes the value filter owned by a row or column field.

```typescript
setValueFilter(fieldId: string, filter?: Omit<IPivotTableValueFilter, 'type'>): Promise<boolean>
```

**Parameters**

* `fieldId` — Required. The row or column table-field identifier.
* `filter` — Optional. The rule, or `undefined` to remove it.

**Returns**

Whether the value filter was updated.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`Omit`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`IPivotTableValueFilter`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/interface.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.setZOrder`

Moves this PivotChart to a zero-based Drawing order index.

```typescript
setZOrder(index: number): this
```

**Parameters**

* `index` — Required. The target zero-based z-order index.

**Returns**

This PivotChart for chaining.

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.subUnitId`

The worksheet identifier that hosts this PivotChart.

```typescript
readonly subUnitId: string
```

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.toBuilder`

Creates a detached, source-locked Builder prefilled from this PivotChart.

```typescript
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`](https://unpkg.com/@univerjs-pro/pivot-chart@1.0.0-rc.0/lib/types/chart-type.d.ts) · [`FBoundSheetPivotChartBuilderOf`](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart-builder.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.unitId`

The workbook identifier that owns this PivotChart.

```typescript
readonly unitId: string
```

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `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.

```typescript
update(info: ISheetPivotChartInfo): Promise<this>
```

**Parameters**

* `info` — Required. Detached information created by `getInfo` or `toBuilder`.

**Returns**

This live PivotChart after the command is accepted.

**Throws**

If the source, report fields, Chart type, or Drawing layout is invalid.

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`ISheetPivotChartInfo`](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.updateFieldPosition`

Moves one report field to a zero-based area index.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`PivotTableFiledAreaEnum`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/enum.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)

### `FSheetPivotChart.updateValuePosition`

Moves the synthetic multiple-values field.

```typescript
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`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts) · [`PivotTableValuePositionEnum`](https://unpkg.com/@univerjs-pro/engine-pivot@1.0.0-rc.0/lib/types/types/enum.d.ts)

**Package:** [`@univerjs-pro/sheets-pivot-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-pivot-chart.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-pivot-chart@1.0.0-rc.0/lib/types/facade/f-pivot-chart.d.ts)
