# @univerjs-pro/engine-chart

> Language fallback: requested `ja-JP`; content is `en-US`.

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

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

- Requested language: `ja-JP`

- Content language: `en-US`

- Documentation version: `1.1.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.

For Docs, Slides, or Boards charts that reference another document's data, also register [`UniverChartEmbedPlugin`](https://docs.univer.ai/ja-JP/reference/packages/plugins/univerjs-pro/chart-embed.md). Reference loading, `IResourceRefChartDataSourceInput`, and `IChartDataSourceRuntimeService` are exported by `@univerjs-pro/chart-embed`. The engine provides inline data, `IChartDataSourceDescriptor`, `IChartHostDataSourceBinding`, `ChartInlineDataSourceBinding`, `ChartProjectedDataSource`, and the shared `ChartDataSourceRuntimeStatus` / `IChartDataSourceStatus` types.

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/ja-JP/reference/facade/chart.md) 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.

## 3D views and logarithmic scales

The shared renderer supports 3D Line, Column, Bar, Pie, and Area families through their `ChartTypeString` variants. Use [`FThreeDChartBuilder.setThreeD()`](https://docs.univer.ai/ja-JP/reference/facade/three-d-chart-builder.md#setthreed) for the view and [`FAxisThreeDChartBuilder.setDepthAxis()`](https://docs.univer.ai/ja-JP/reference/facade/axis-three-d-chart-builder.md#setdepthaxis) for the depth axis. Existing product chart plugins register this runtime. See [3D chart examples](https://docs.univer.ai/ja-JP/guides/sheets/features/charts.md#three-dimensional-charts).

Supported 2D numeric axes accept `scaleType: 'log'` and an optional `logBase`. Configure the axis with [`FAxisChartBuilder`](https://docs.univer.ai/ja-JP/reference/facade/axis-chart-builder.md), then apply the detached builder to an existing chart with `await chart.update(builder.build())`. See [logarithmic axes](https://docs.univer.ai/ja-JP/guides/sheets/features/charts.md#logarithmic-axes) for supported chart types, positive-data requirements, and restoring a linear scale.

## IUniverChartConfig

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

## Entry Points

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