@univerjs-pro/sheets-chart
이 API 페이지의 본문은 현재 영어로 제공됩니다. 코드 시그니처와 식별자는 언어에 따라 바뀌지 않습니다.
Chart model integration for Univer Sheets.
TypeScript
import { UniverSheetsChartPlugin } from '@univerjs-pro/sheets-chart'univer.registerPlugin(UniverSheetsChartPlugin)Entry Points
- Facade:
@univerjs-pro/sheets-chart/facade - Locale:
@univerjs-pro/sheets-chart/locale/*
IUniverSheetsChartConfig
TypeScript
import type { ChartRenderMode, IChartHostRect } from '@univerjs-pro/engine-chart'export interface IUniverSheetsChartConfig { chartRenderMode?: ChartRenderMode defaultChartSize?: IChartHostRect}chartRenderMode defaults to ChartRenderMode.Image. defaultChartSize supplies the default chart rectangle.
Chart sheet Facade
FWorkbook.insertChartSheet() creates a chart sheet and its primary chart. FWorksheet.getPrimaryChart() and FWorksheet.getCharts() return live chart handles with these methods.
| Method | Behavior |
|---|---|
getWorksheet(): FWorksheet | null | Returns the current host after moves and undo/redo. Returns null when the chart or its host no longer exists. |
isPrimary(): boolean | Checks whether the chart is the primary chart of its current chart sheet. |
moveTo(target: FWorksheet): Promise<this> | Moves the chart to a sheet in the same workbook and Univer instance. Rejects if the target or move is invalid. |
Shared chart methods such as setErrorBars() are on FChart.
이 가이드는 어떠셨나요?