在 VS Code / Cursor 与 JetBrains 系列 IDE 中,为 Markdown 与独立文件提供 AntV Infographic 的实时预览与编辑能力。
在扩展/插件市场中搜索 AntV Infographic Markdown Preview,或点击下方标签进入对应市场安装:
- Markdown 内嵌预览:在
```infographic代码块中编写 Infographic DSL,在 Markdown 预览里直接渲染图表。 .infographic独立文件:将 DSL 存为.infographic文件,带专属图标;打开文件时可使用侧栏 Infographic 编辑 Webview 做可视化编辑、预览与导出图片。- 多 IDE 支持:同一套预览与编辑体验可在常用编辑器中使用。
在 Markdown 中加入如下代码块:
```infographic
infographic list-row-simple-horizontal-arrow
data
lists
- label Step 1
desc Start
- label Step 2
desc In Progress
```打开 Markdown 预览即可查看渲染结果。示例见 examples/sample.md。
将 DSL 保存为 .infographic 文件(例如 examples/sample.infographic)。在资源管理器中会有 AntV 图标;在编辑器中打开后,扩展会在侧栏打开 Infographic 编辑 Webview,便于可视化编辑、预览与导出。若只需文本编辑,可关闭侧栏面板。
