Files
terminal-chart-server/changelog.md
titor ba927c2b2f feat: initial release v0.3.0
- Support 9 chart types: line, bar, pie, scatter, bubble, donut, mixed, polar, radar
- Multi-format output: ANSI, SVG, PNG, Markdown
- Go + Fiber + gonum/plot
- Docker support
- Morandi color palette
2026-04-16 04:33:02 +08:00

66 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# changelog.md
## 待实现 (Todo)
- [ ] 单元测试
- [ ] 集成测试
- [ ] 配置文件热加载
- [ ] 图表缓存机制
## 已实现 (Done)
- [x] 项目结构搭建
- [x] 核心类型定义
- [x] SVG 渲染器
- [x] PNG 渲染器
- [x] ANSI 渲染器
- [x] 纯文本渲染器
- [x] API Handler
- [x] Docker 部署配置
- [x] 饼图 (pie) 支持
- [x] 散点图 (scatter) 支持
- [x] 圆环图 (donut) 支持
- [x] 气泡图 (bubble) 支持
- [x] 混合图 (mixed) 支持
- [x] 极区图 (polar) 支持
- [x] 雷达图 (radar) 支持
## 版本记录
### v0.3.0 (2026-04-16)
- 新增图表类型:圆环图、气泡图、混合图、极区图、雷达图
- 支持 9 种图表类型
### v0.2.0 (2026-04-16)
- 新增图表类型:饼图、散点图
- 优化 ANSI 渲染器
### v0.1.0 (2026-04-16)
- 初始版本
- 支持图表类型line, bar
- 支持输出格式text, ansi, svg, png_url, markdown
## 认知纠正 (Knowledge)
### Go 图表库选型
1. **gonum/plot** - 纯 Go无外部依赖适合生成静态图片PNG/SVG
2. **ntcharts** - 专为 Bubble Tea TUI 设计,终端内渲染,依赖较多
3. **pterm** - 终端美化库,有 BarChart 组件,但不支持 PNG/SVG
**结论**:对于需要同时支持 WebPNG/SVG和 CLIANSI的场景gonum/plot + 自写 ANSI 渲染器是最佳组合。
### 设计模式应用
1. **策略模式**:不同的渲染器实现统一的 Renderer 接口
2. **工厂模式**RendererFactory 根据格式类型创建对应渲染器
### Docker 注意事项
- 使用 `golang:alpine` 减小镜像体积
- 多阶段构建:编译 -> 运行
- 端口映射3100:3100