Skip to content

feat(dashboard): 请求量与 Token 用量趋势图改为堆叠面积图;#170

Merged
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
vk/b807-y
Apr 15, 2026
Merged

feat(dashboard): 请求量与 Token 用量趋势图改为堆叠面积图;#170
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
vk/b807-y

Conversation

@ThreeFish-AI

@ThreeFish-AI ThreeFish-AI commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • 将 Dashboard 中的「请求量趋势」和「Token 用量趋势」两张折线图改为堆叠面积图,Y 轴显示各 vendor 的累加值
  • Tooltip 增加合计行,悬停时显示每个 vendor 的具体数值及总量
  • 背景色由全画布渐变 (makeGradient) 改为半透明纯色 (color + '30'),与已有的「按 Vendor/模型 Token 用量」堆叠图风格保持一致

Changes

修改文件: src/coding/proxy/server/dashboard.py (+21/-6)

buildTimeline(请求量趋势)

  • backgroundColor: makeGradient(ctx, color)color + '30'(堆叠图中渐变会导致各层颜色不一致)
  • Y 轴增加 stacked: true,实现垂直堆叠
  • Tooltip 增加 callbacks.labelfmtNum 格式化请求数)和 callbacks.footer(合计行)

buildTokenTimeline(Token 用量趋势)

  • backgroundColor: 同上改为半透明纯色
  • Y 轴增加 stacked: true
  • Tooltip 增加合计行(footerfmtTokens 格式化)

Test plan

  • 验证两张堆叠面积图正确渲染,Y 轴为累加值
  • 鼠标悬停 tooltip 显示各 vendor 数值及「合计」行
  • 点击 Legend 切换 vendor 可见性时堆叠正确重算
  • 第三张「按 Vendor/模型 Token 用量」堆叠图不受影响

🤖 Generated with Claude Code

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
@ThreeFish-AI
ThreeFish-AI merged commit d74e50f into feature/1.x.x Apr 15, 2026
12 checks passed
@ThreeFish-AI ThreeFish-AI changed the title 如图所示的三张折线图,我需要你改进为堆叠图。即每个折线单独表示的量之间相互堆叠,而不是每个量都从零开始,要在 Y (vibe-kanban) feat(dashboard): 请求量与 Token 用量趋势图改为堆叠面积图; Apr 15, 2026
@ThreeFish-AI
ThreeFish-AI deleted the vk/b807-y branch April 16, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant