Files
SunCheng c49f66757e
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Waiting to run
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
Docker Build & Deploy / Cleanup Dangling Images (push) Has been cancelled
Docker Build & Deploy / WeChat Notification (push) Has been cancelled
1
2026-02-18 21:16:45 +08:00

45 lines
1.7 KiB
Markdown
Raw 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.
## ADDED Requirements
### Requirement: 图表文本编码修复
Chart.js 图表 SHALL 正确显示中文文本,不出现乱码或异常字符。
#### Scenario: 饼图标签中文显示
- **WHEN** 系统渲染支出分类饼图,分类名称为中文
- **THEN** 分类标签 SHALL 正确显示中文字符
- **AND** 标签文字 SHALL 清晰可读,无乱码
#### Scenario: Tooltip 中文显示
- **WHEN** 用户 hover 到图表数据点
- **THEN** Tooltip SHALL 正确显示中文内容
- **AND** 金额和分类名称 SHALL 无乱码
#### Scenario: 中心文本中文显示
- **WHEN** 仪表盘图表渲染中心文本
- **THEN** 中心显示的余额/超支文本 SHALL 正确显示中文
- **AND** 文字 SHALL 清晰无乱码
### Requirement: 图表字体配置
Chart.js 配置 SHALL 使用兼容的字体设置,确保跨平台文本正确渲染。
#### Scenario: 字体族配置
- **WHEN** 图表初始化时
- **THEN** 系统 SHALL 配置 `font.family` 为兼容中文字体的字体栈(如 `'PingFang SC', 'Microsoft YaHei', sans-serif`
#### Scenario: 响应式字体大小
- **WHEN** 图表在不同尺寸屏幕上渲染
- **THEN** 字体大小 SHALL 根据屏幕尺寸自动调整
- **AND** 文字 SHALL 始终保持清晰可读
### Requirement: Tooltip 格式化修复
Tooltip 回调函数 SHALL 正确处理文本编码和格式化。
#### Scenario: Tooltip Label 格式化
- **WHEN** Tooltip 显示数据标签
- **THEN** 回调函数 SHALL 返回正确编码的字符串
- **AND** 特殊字符 SHALL 正确转义
#### Scenario: 金额格式化显示
- **WHEN** Tooltip 显示金额
- **THEN** 金额格式 SHALL 为 "¥XXX.XX"
- **AND** 货币符号 SHALL 正确显示