improve analytics chart with hourly today view and readable labels

- add visitors_by_hour query for hourly breakdown on "today" period
- replace SVG-only chart with HTML/CSS grid layout (bars + labels)
- Y-axis scale with nice rounded max, midpoint, and zero
- X-axis date labels (formatted as "Feb 18") spaced evenly
- adaptive bar gaps (1px for sparse data, 0 for 365-day dense view)
- labels use real HTML text so they're readable on mobile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-22 23:28:35 +00:00
parent 65e646a7eb
commit 08fcd60eb6
3 changed files with 130 additions and 35 deletions

View File

@@ -662,6 +662,15 @@
}
}
/* ── Analytics chart labels ── */
.analytics-y-labels,
.analytics-x-labels {
font-size: 0.6875rem;
color: color-mix(in oklch, var(--color-base-content) 55%, transparent);
font-variant-numeric: tabular-nums;
}
/* ── Setup page ── */
.setup-page {