@univerjs-pro/engine-chart
v1.6.2
Published
Chart data model and rendering utilities for Univer Pro.
Readme
@univerjs-pro/engine-chart
@univerjs-pro/engine-chart is part of Univer Pro. Chart data model and rendering utilities for Univer Pro.
Package Overview
| Package | UMD global | CSS | Locales | Facade entry | Worker entry |
| --- | --- | :---: | :---: | :---: | :---: |
| @univerjs-pro/engine-chart | UniverProEngineChart | No | Yes | Yes | No |
Installation
pnpm add @univerjs-pro/engine-chart
# or
npm install @univerjs-pro/engine-chartUsage
Start with the integration setup for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
import { UniverChartPlugin } from '@univerjs-pro/engine-chart';
univer.registerPlugin(UniverChartPlugin);Integration Notes
UniverChartPluginprovides the shared chart rendering runtime for Sheets, Docs, Slides, and Boards.- Configure shared word-cloud rendering defaults when registering the plugin. Partial options are merged with the static chart defaults.
univer.registerPlugin(UniverChartPlugin, {
wordCloudRenderConfig: {
padding: 3,
zoomToFit: {
shrink: true,
},
},
});- Load the locale resources from
@univerjs-pro/engine-chart/locale/<language>for each language enabled by your application. - Import
@univerjs-pro/engine-chart/facadewhen using this package through Univer Facade APIs. LineStackedandLinePercentStackedare two-dimensional standalone chart types. Combination child series and three-dimensional stacked Line are not supported.- Enable authoring of stacked Line charts only after server replay/rendering and Office Exchange support their persisted chart types.
