Référence de l’API

@univerjs-pro/sheets-chart-thread-comment

Cette page API est actuellement disponible en anglais. Les signatures et identifiants restent identiques dans toutes les langues.

Comment integration for chart objects returned by the Sheets chart Facade (FSheetChart). Configure Sheets charts and register this plugin before opening a workbook.

TypeScript
import { UniverSheetsChartThreadCommentPlugin } from '@univerjs-pro/sheets-chart-thread-comment'import '@univerjs-pro/sheets-chart-thread-comment/facade'univer.registerPlugin(UniverSheetsChartThreadCommentPlugin)const chart = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getCharts()[0]await chart?.createCommentAsync('Verify the chart source.')

The plugin supplies its shared Shape/thread-comment dependencies. It has no configuration options, locales, or styles of its own. Configure comment UI and persistence through the Sheets comments guide.

Facade methods

MethodBehavior
createCommentAsync(content, options?)Creates a comment anchored to the chart. Accepts plain text or a document body and optional IDs, author, attachments, and creation time. Resolves to command success; empty content throws TypeError.
getComments()Returns locally loaded matching comment threads.
listCommentsAsync()Synchronizes known threads, then returns matching comments.

Import @univerjs-pro/sheets-chart-thread-comment/facade to register these methods on chart objects returned by getCharts() or insertChart().

Que pensez-vous de ce guide ?

© 2026 DreamNum Co., Ltd.