fix: add defensive checks to BudgetChartAnalysis chart data

- Added null checks for overallStats.month/year in gauge charts
- Added null checks for burndown and year burndown charts
- Fixed BaseChart.vue template using undefined 'chartData' variable
- Changed :data="chartData" to :data="data" to use prop directly

Fixes console errors when viewing /budget-v2 page
Verified: 0 errors, only 1 harmless plugin warning

Refs: openspec/changes/migrate-remaining-echarts-to-chartjs
This commit is contained in:
SunCheng
2026-02-16 22:04:10 +08:00
parent 9921cd5fdf
commit d1737f162d
7 changed files with 144 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
- [x] 2.7 创建 `chartOptions` computed 属性,使用 `getChartOptions()`
- [x] 2.8 替换模板为 `<BaseChart type="line" :data="chartData" :options="chartOptions" />`
- [x] 2.9 删除 `onBeforeUnmount()` 中的 ECharts cleanup 代码
- [ ] 2.10 本地浏览器验证图表渲染正确Chrome DevTools
- [x] 2.10 本地浏览器验证图表渲染正确Chrome DevTools
## 3. 迁移 DailyTrendChart.vue双系列折线图