# FAreaChartBuilder

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

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

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

- Requested language: `zh-CN`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

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

---

Fluent, type-specific Builder for Area Charts.

## Inheritance

Extends [`FCartesianChartBuilder`](https://docs.univer.ai/zh-CN/reference/facade/cartesian-chart-builder.md). Its inherited members are available on this object.

## Example

Sheet

```ts
const fWorkbook = univerAPI.getActiveWorkbook()
const fWorksheet = fWorkbook.getSheetByName('Sheet1')
const chartInfo = fWorksheet
  .newChart(univerAPI.Enum.ChartTypeString.Area)
  .setSource('A1:D8')
  .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
  .build()
await fWorksheet.insertChart(chartInfo)
```

Doc

```ts
const fDocument = univerAPI.getActiveDocument()
const chartInfo = fDocument
  .newChart(univerAPI.Enum.ChartTypeString.Area)
  .setSource([
    ['Month', 'East', 'West'],
    ['Jan', 120, 95],
    ['Feb', 180, 130],
  ])
  .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
  .build()
await fDocument.insertChart(chartInfo)
```

Slide

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const chartInfo = fSlide
  .newChart(univerAPI.Enum.ChartTypeString.Area)
  .setSource([
    ['Month', 'East', 'West'],
    ['Jan', 120, 95],
    ['Feb', 180, 130],
  ])
  .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
  .build()
await fSlide.insertChart(chartInfo)
```

Board

```ts
const fBoard = univerAPI.getActiveBoard()
const chartInfo = fBoard
  .newChart(univerAPI.Enum.ChartTypeString.Area)
  .setSource([
    ['Month', 'East', 'West'],
    ['Jan', 120, 95],
    ['Feb', 180, 130],
  ])
  .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
  .build()
await fBoard.insertChart(chartInfo)
```

## Setup

Register [`@univerjs-pro/engine-chart`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/engine-chart.md) or a preset that includes it. In plugin mode, import `@univerjs-pro/engine-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/engine-chart`

### `FAreaChartBuilder.clearAreaLineStyle`

Clears the area line style override and restores a straight line between points.

This method executes synchronously.

```typescript
clearAreaLineStyle(): this
```

**Returns**

This builder for chaining.

**Examples**

```ts
builder.clearAreaLineStyle()
```

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

### `FAreaChartBuilder.setAreaLineStyle`

Sets the area line style configuration and returns this builder for chaining.

This method executes synchronously.

```typescript
setAreaLineStyle(value: AreaLineStyle): this
```

**Parameters**

* `value` — Required. The semantic value to record.

**Returns**

This builder for chaining.

**Examples**

```ts
builder.setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
```

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

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