# @univerjs-pro/engine-chart

- Human documentation: [https://docs.univer.ai/reference/packages/plugins/univerjs-pro/engine-chart](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/engine-chart)

- Agent Markdown: [https://docs.univer.ai/reference/packages/plugins/univerjs-pro/engine-chart.md](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/engine-chart.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [packages/plugins/univerjs-pro/engine-chart.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/packages/plugins/univerjs-pro/engine-chart.mdx)

---

Shared chart runtime for Sheets, Docs, Slides, and Boards. It owns common chart models, themes, styles, data-source utilities, and word-cloud rendering configuration.

```typescript
import { UniverChartPlugin } from '@univerjs-pro/engine-chart'

import '@univerjs-pro/engine-chart/facade'

univer.registerPlugin(UniverChartPlugin, {
  wordCloudRenderConfig: {
    // Optional ECharts word-cloud renderer defaults.
  },
})
```

Product-specific chart plugins depend on this shared runtime. Continue registering the Sheets, Docs, Slides, or Boards chart plugin for the host you use.

The Facade entry provides shared chart builders and the live `FChart` API. Host facades expose `newChart(type)`, `insertChart(info)`, `getChart(id)`, and `getCharts()`. Builders accept data through `setSource()`; inserted charts use `setDataSource()` or `toBuilder()` plus `update()`. See the [Chart Facade lifecycle](https://docs.univer.ai/reference/facade/chart.md#host-lifecycle) for a complete example.

For hierarchical labels, call `setCategoryFields(indexes)` in root-to-leaf order and enable `setMultiLevelCategoryAxis(true)`. Both detached builders and live charts expose these methods. The root entry also exports `IChartDataCategoryLevel`, `IChartDataCategorySegment`, and `IUniverDataSetCategorySpan` for integrations that construct chart datasets directly.

## IUniverChartConfig

```ts
export interface IUniverChartConfig {
  wordCloudRenderConfig?: IWordCloudRenderConfig
}
```

## Entry Points

* Facade: `@univerjs-pro/engine-chart/facade`
* Locale: `@univerjs-pro/engine-chart/locale/*`
