mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
Recharts ignores the `interval` prop on `<XAxis type="number" />`. The pulse + mood charts switched to numeric axes in v1.4.25 to support multi-band rendering, which silently degraded the day-aware density policy to "every tick" on those charts. On a 365-row pulse view that meant ~365 overlapping labels. Add `computeTickPositions(chartData, viewportWidth)` — translates the existing `chooseTickInterval` skip count into explicit indices the numeric axis consumes via the `ticks` prop. Tick count clamps to a 3-12 visible-label range so dense series don't overcrowd and sparse series don't collapse to a single label. The category-axis charts (`compliance-line-chart`, `medication-compliance-chart`) stay on `interval` — Recharts honours it there.