API 참조

@univerjs-pro/engine-chart

이 API 페이지의 본문은 현재 영어로 제공됩니다. 코드 시그니처와 식별자는 언어에 따라 바뀌지 않습니다.

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

TypeScript
export interface IUniverChartConfig {  wordCloudRenderConfig?: IWordCloudRenderConfig}

Entry Points

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

이 가이드는 어떠셨나요?

© 2026 DreamNum Co., Ltd.