feat: add timeline5 (5-day) support for timeline chart#1
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for a 5-day timeline view (timeline5) by implementing VWAP calculations, day-boundary detection for multi-day charts, and specific xAxis formatting. Key feedback includes fixing a bug where non-cumulative volume and amount values were used in the data mapping, addressing regressions in the xAxis formatter and label interval logic that affected the standard 1-day view, and suggesting the abstraction of duplicated cache key construction logic.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for 5-day timeline charts (timeline5) with VWAP calculations and multi-day axis formatting. It also adds configurable visibility for data zoom sliders in both K-line and timeline views. Feedback focuses on improving the user experience by setting the loading state when clearing data, ensuring consistent x-axis label formatting and placement, and aligning data zoom IDs to maintain compatibility with the chart's zoom methods.
40358bb to
9f89775
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for 5-day timeline charts and infinite scrolling for K-line charts. Key changes include the implementation of a loadMore mechanism in the useKlineData hook, logic to maintain the chart's visual range when prepending historical data, and the addition of showDataZoomSlider and showTimelineDataZoom props for UI customization. Feedback suggests improving the sensitivity of the scroll-to-load trigger by using a threshold instead of an exact zero check and extracting hardcoded pagination limits into constants.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for loading more historical data via infinite scrolling (scrolling left), adds a 5-day timeline view (timeline5) with VWAP calculation, and provides a new showDataZoomSlider prop to control the visibility of the zoom slider. Key changes include the implementation of a loadMore function in useKlineData, logic to maintain the visible range when prepending data, and enhanced timeline chart building to support multi-day displays. Review feedback highlights that hardcoding the initial zoom range to start: 2 overrides the visibleCount property, suggests merging redundant event listeners, and recommends handling errors during the "load more" process.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enhances the K-line chart component by implementing infinite scrolling for historical data and adding support for a 5-day timeline view. Key updates include the loadMore functionality in the useKlineData hook, VWAP calculations for the timeline5 period, and improved zoom state management to maintain the visible range when prepending data. Additionally, a new showDataZoomSlider prop allows for granular control over the zoom slider's visibility across different chart periods. I have no feedback to provide as there are no review comments to address.
156ac4a to
8fcd77d
Compare
121ac8b to
8346c7c
Compare
## 新增功能
- 五日分时图(timeline5):VWAP 均价线计算(按交易日重置累计量),多日日期标签居中显示,日间虚线分隔
- 无限滚动加载(loadMore):日K/周K/月K 向左滚动自动加载历史数据,通过 requestOptions.loadMoreLimit 可配置每次请求数量
- 统一 dataZoom 控制:新增 showDataZoomSlider prop,支持 boolean | Partial<Record<PeriodType, boolean>>,可按周期单独控制缩放开关(如 { timeline: false, timeline5: false })
## 修复功能
- 分时图成交量计算:修复跨交易日累计重置时差值为负,导致成交量显示异常
8346c7c to
36c49f8
Compare

新增功能
修复功能