feat: enhance vital signs matrix chart payload and visualization
- Introduced new functions to handle vital signs data retrieval and processing, including fallback mechanisms for missing values. - Updated SQL queries in `build_vital_signs_matrix_chart_payload` to improve date filtering and data accuracy. - Enhanced the frontend `RecoveryDashboardOverview` component to display vital signs with contextual coloring based on health tones. - Adjusted the data structure for chart rendering, ensuring a more informative and visually appealing representation of vital metrics.
This commit is contained in:
1 parent
d3cb9d4ad9
commit
d4868b3797
5 files changed
+392
-77
No files matched your search
@@ -55,7 +55,8 @@ def get_recovery_dashboard_viz_bundle(profile_id: str, days: int) -> Dict[str, A
|
||||
all_history = days >= 9999
|
||||
eff_days = 3650 if all_history else max(7, min(int(days), 3650))
|
||||
chart_days = min(90, max(7, min(eff_days, 365)))
|
||||
vital_days = min(30, max(7, chart_days))
|
||||
# Vital-Matrix: längeres Fenster + Fallback im Builder, damit nicht nur „letzte 30 Tage“
|
||||
vital_days = min(365, max(30, min(eff_days, 365)))
|
||||
|
||||
recovery_score_val = calculate_recovery_score_v2(profile_id)
|
||||
sleep_debt = calculate_sleep_debt_hours(profile_id)
|
||||
|
||||
Reference in new issue
Block a user