feat(nav): Enhance product API with historical NAV tracking and new charting features
- Updated `ready.py` to include a health check for the new `products_nav_history` endpoint, ensuring system readiness. - Enhanced the `ProductNavChartPanel` component to visualize historical NAV data with various charting options, including line and column charts. - Introduced new utility functions for filtering and aggregating NAV data, improving data handling in the frontend. - Updated tests to verify the inclusion of the new `products_nav_history` check in the API response. - Improved documentation to reflect recent changes and the new testing baseline of 833 passed tests, indicating enhanced stability. This update significantly improves the product API by providing access to historical NAV data and enhancing user insights through visualizations.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# 产品净值详情图表 · 设计摘要(2026-09-11)
|
||||
|
||||
## 问题
|
||||
|
||||
- X 轴用字符串分类轴,365 点标签拥挤、顺序易误解。
|
||||
- Y 轴未按净值区间 padding,曲线贴边。
|
||||
- 缺代销平台常见的区间、粒度、涨跌视图。
|
||||
|
||||
## 方案
|
||||
|
||||
| 能力 | 实现 |
|
||||
| --- | --- |
|
||||
| 时间轴 | `scale.x.type = 'time'`,按区间切换 `MM-DD` / `YYYY-MM` |
|
||||
| Y 轴 | `navYDomain()` 8% padding,禁用误导性 0 基线 |
|
||||
| 区间 | 近1月/3月/6月/1年/全部(锚定最新净值日) |
|
||||
| 粒度 | 日 / 周(周取每周最后样本) |
|
||||
| 图型 | 走势(面积线)· 涨跌柱(%)· 组合(上线下柱) |
|
||||
|
||||
代码:`web/src/utils/navChartSeries.ts` · `web/src/components/market/ProductNavChartPanel.tsx`
|
||||
Reference in New Issue
Block a user