Commit a24508f
authored
refactor: uplift metrics (#4499)
# Description
This pull request implements a dual-chart system for metrics visualization with brush-based zooming functionality. The changes introduce an overview chart showing 7 days of data with a brush selector, and a detail chart that displays the selected time range with higher resolution data.
Key changes include:
- Added chart synchronization context with default 24-hour brush range and 7-day maximum range
- Implemented separate hooks for overview and detail metrics data fetching
- Enhanced timestamp parsing to normalize date formats for consistent browser compatibility
- Added brush range clamping to prevent excessive data requests
- Removed time range selector in favor of interactive brush-based navigation
- Improved chart layout with proper spacing and legend positioning
- Added placeholder data support to prevent chart flickering during updates
## Type of change
- [x] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
## How Has This Been Tested?
The changes have been tested by:
- Verifying brush selection updates the detail chart with appropriate resolution
- Testing brush range clamping with selections exceeding the 7-day maximum
- Confirming timestamp normalization works across different date formats
- Validating smooth transitions between overview and detail data loading states
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes1 parent 6151ab0 commit a24508f
8 files changed
Lines changed: 279 additions & 233 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments