@univerjs-pro/docs-chart-thread-comment
本 API 页面目前提供英文正文。代码签名与标识符不随界面语言变化。
Comment integration for document charts (FDocumentChart). Configure Docs charts and register this plugin before opening a document.
TypeScript
import { UniverDocsChartThreadCommentPlugin } from '@univerjs-pro/docs-chart-thread-comment'import '@univerjs-pro/docs-chart-thread-comment/facade'univer.registerPlugin(UniverDocsChartThreadCommentPlugin)const chart = univerAPI.getActiveDocument()?.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 Docs comments guide.
Facade methods
| Method | Behavior |
|---|---|
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. |
See the chart Facade reference for signatures. Import @univerjs-pro/docs-chart-thread-comment/facade to register these methods.
你觉得这篇文档如何?