Add trend charts and calendar-week averages to History page
Adds Recharts-based calorie and macro trend charts plus real calendar-week (Mon-Sun) averages, replacing the old rolling 7-day average. Colors were chosen and validated with the dataviz skill's contrast/CVD checks separately for light and dark mode. Fixes a timezone bug where Date.toISOString() shifted week boundaries by one day in UTC+ timezones, and two Recharts pitfalls (negative chart margin hiding the Y-axis, mount animation stuck invisible in headless browsers). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
"html5-qrcode": "^2.3.8",
|
||||
"react": "^19.2.7",
|
||||
"react-dom": "^19.2.7",
|
||||
"react-router-dom": "^7.18.1"
|
||||
"react-router-dom": "^7.18.1",
|
||||
"recharts": "^3.10.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.3.2",
|
||||
|
||||
Reference in New Issue
Block a user