图表、文档与可视化
从图像生成图表、电子表格、PDF、演示文稿和技术分析
🟢 初学者友好。在你的机器上生成文件,无资金流动。
Agent 可以生成可视化产物:ECharts 交互式图表、Word/PDF/PowerPoint 文档,以及分析上传的图表图像来识别技术形态。
你可以做什么
- 图表生成:价格图表、对比图表、投资组合饼图
- 从图像进行技术分析:上传 K 线截图进行技术分析
- 文档生成:Word、PDF、PowerPoint 报告产物
- 电子表格创建:数据表和分析导出
- 数据可视化:任何结构化数据渲染为图表
示例提示词
create a chart comparing BTC and ETH performance over 6 months
analyze this chart [upload screenshot] — what patterns do you see?
generate a PDF report of my portfolio performance
create a spreadsheet of the top 20 DeFi protocols by TVL示例输出。图表生成
提示词:create a chart comparing BTC and ETH performance over 6 months, indexed to 100 at start
Agent 回应:
Creating interactive ECharts visualization…
Chart is ready: BTC vs ETH, 6-month indexed.
Data summary (2026-10-17 → 2026-04-17):
- BTC: 100 → 138.5 (+38.5%)
- ETH: 100 → 125.7 (+25.7%)
- BTC outperformed by 12.8 percentage points
- BTC max drawdown: -14.2% (Jan 2026)
- ETH max drawdown: -21.4% (Jan 2026)
- Correlation: 0.82 (strong, as expected)
Want me to add a correlation heatmap or extend the window?
轮次结束时,图表引用会解析为沙盒中的三个文件:
📎 Artifacts
📊 BTC vs ETH, 6-month indexed
html → file:///…/sandbox/files/artifacts/x-a3b48f/chart-x-a3b48f.html
json → file:///…/sandbox/files/artifacts/x-a3b48f/chart-x-a3b48f.json
png → file:///…/sandbox/files/artifacts/x-a3b48f/chart-x-a3b48f.png- HTML。自包含页面,从公共 CDN 加载 ECharts。在浏览器中打开可交互(提示、图例切换、缩放)。
- JSON。原始
{ charts: [...] }选项,可导入任何 ECharts 查看器或嵌入你的应用。 - PNG。通过 Playwright 以 2× DPR 渲染。尽力而为;若未安装 Chromium,HTML 和 JSON 仍可生成,PNG 跳过并记录警告。
示例输出。图像技术分析
提示词:analyze this chart [上传 4h BTC 图表截图]
Agent 回应:
4-hour BTC chart, pattern analysis:
- Ascending triangle forming since April 10。水平阻力位 $68.2k,上升支撑来自 $63.4k 低点。
- Volume profile。每次反弹阻力时成交量下降(典型的积累设置)。尚未确认。
- RSI-14。58。超买前还有上升空间。
- Projected breakout target: $68.2k + (triangle height $4.8k) = $73.0k measured move.
Caveats: ascending triangles fail ~30% of the time, especially on lower timeframes. Confirm with a 4h candle close above $68.4k on rising volume before treating this as a real breakout.
示例输出。PDF 报告
提示词:generate a PDF report of my portfolio performance over Q1
Agent 回应:
Compiled a Q1 performance report. Sections: holdings overview, realized vs unrealized P&L, top contributors, drawdown breakdown, and a risk commentary.
Written to
reports/portfolio-q1-2026.pdf(7 pages, 142 KB).
📎 Artifacts
📄 Portfolio — Q1 2026
pdf → file:///…/sandbox/files/reports/portfolio-q1-2026.pdfPDF 由 pdf_create 工具(pdf-lib,MIT)生成。纯文本输出,按 Helvetica 信纸尺寸换行。Agent 传递 { title, sections: [{ heading?, paragraphs }] } 载荷。
示例输出。Word(DOCX)备忘录
提示词:write a DOCX memo summarizing the top 5 DeFi protocol risks
Agent 回应:
Drafted a five-section memo. Each risk has a one-paragraph explanation plus a mitigation note. Kept headings at H2 so you can paste into any template.
Written to
memos/defi-risks.docx(5 sections, 18 KB).
📎 Artifacts
📄 DeFi protocol risks — memo
docx → file:///…/sandbox/files/memos/defi-risks.docxDOCX 由 docx_create(docx npm,MIT)生成。形状与 PDF 相同。{ title, sections }。两个工具共享输入约定,你可以交替请求任一格式。
示例输出。电子表格(CSV)
提示词:create a CSV of the top 20 DeFi protocols by TVL
Agent 回应:
Pulled the top 20 from DefiLlama. Columns: rank, protocol, chain, category, TVL (USD), 7d change, 30d change. Sorted by TVL desc.
Written to
data/defi-top20-tvl.csv(21 rows including header).
📎 Artifacts
📊 DeFi top-20 by TVL
csv → file:///…/sandbox/files/data/defi-top20-tvl.csv电子表格以 CSV 形式通过 write_file 工具导出到沙盒。若需更丰富的格式(公式、多工作表、样式化单元格),请要求 PDF 或 DOCX 报告来嵌入表格。文档工具处理布局,数据来自相同的 DefiLlama / 市场数据技能。
XLSX 注意。Agent 不原生生成
.xlsx文件。CSV 以最少依赖权重涵盖分析导出用例。XLSX 支持作为输入:上传电子表格,电子表格解析器将其转换为 Agent 推理的结构化文本。
涉及的技能和工具
| 技能 | 角色 |
|---|---|
viz-chart | ECharts 交互式图表产物(每个图表的 HTML + JSON + PNG) |
workspace.documents | Word / PDF / PowerPoint 创建与编辑(docx_create、docx_replace、pdf_create、pdf_merge、pdf_split、pdf_watermark、pptx_create、pptx_export_images) |
workspace.files | 沙盒文件读写/搜索。CSV 导出位于此处 |
research.web | 可视化数据收集 |
场景。SCENARIO_VISUALIZATION · SCENARIO_CHART_TECHNICAL_ANALYSIS