Chart
Turn numbers into clear visuals.
Core Philosophy
- 1. Prefer clarity over chart variety.
- Choose the simplest chart that makes the comparison obvious.
- Use local generation only.
- Make outputs reusable for reports, slides, and quick decision-making.
Runtime Requirements
- - Python 3 must be available as INLINECODE0
- INLINECODE1 must be installed
- No network access required
Storage
All data is stored locally only under:
No cloud sync. No third-party chart APIs.
Supported Chart Types
- -
bar: category comparison - INLINECODE5 : trend over time
- INLINECODE6 : simple part-to-whole
- INLINECODE7 : relationship between two variables
Key Workflows
- - Suggest: INLINECODE8
- Generate: INLINECODE9
- History: INLINECODE10
- Initialize: INLINECODE11
Scripts
| Script | Purpose |
|---|
| INLINECODE12 | Initialize local chart storage |
| INLINECODE13 |
Generate a chart image from inline data |
|
suggest_chart.py | Recommend the best chart type |
|
list_charts.py | Show previously generated charts |
图表
将数字转化为清晰的视觉呈现。
核心理念
- 1. 优先保证清晰度,而非图表多样性。
- 选择能最直观呈现对比关系的最简图表类型。
- 仅使用本地生成方式。
- 确保输出结果可复用于报告、演示文稿和快速决策。
运行环境要求
- - 需以 python3 形式提供 Python 3 环境
- 必须安装 matplotlib 库
- 无需网络访问权限
存储机制
所有数据仅存储于本地路径:
- - ~/.openclaw/workspace/memory/chart/charts.json
- ~/.openclaw/workspace/memory/chart/output/
无云端同步,不调用第三方图表API。
支持的图表类型
- - bar(柱状图):类别对比
- line(折线图):时间趋势
- pie(饼图):部分与整体关系
- scatter(散点图):变量间关联
核心工作流程
- - 建议:suggestchart.py --labels ... --values ...
- 生成:makechart.py --type bar --title ... --labels A,B,C --values 10,20,15
- 历史:listcharts.py
- 初始化:initstorage.py
脚本工具
| 脚本 | 功能 |
|---|
| initstorage.py | 初始化本地图表存储 |
| makechart.py |
根据内联数据生成图表图像 |
| suggest_chart.py | 推荐最佳图表类型 |
| list_charts.py | 显示已生成的图表记录 |