diff --git a/frontend/src/AnalyticsView.vue b/frontend/src/AnalyticsView.vue index 95e52f1..504a5bb 100644 --- a/frontend/src/AnalyticsView.vue +++ b/frontend/src/AnalyticsView.vue @@ -152,7 +152,7 @@ const abuseRows = computed(() => formatAbuseRows(rangeData.value?.abuse || [], c
{{ formatCount(visits.length) }} visits
{{ formatCount(totalViews) }} page views
{{ readStats.avgMinPerVisit }} min/visit
-
{{ readStats.avgArticleMedianMin }} min article read
+
{{ readStats.avgArticleMedianMin }} min/read
diff --git a/frontend/src/VisitorCharts.vue b/frontend/src/VisitorCharts.vue index 7d0084f..01f9b10 100644 --- a/frontend/src/VisitorCharts.vue +++ b/frontend/src/VisitorCharts.vue @@ -37,6 +37,11 @@ function freqLabel(unit) { return unit === '5min' ? '5 min' : unit === 'hour' ? 'hourly' : 'daily' } +/** Vertical axis caption: "visits / 5 min" on the day view, else "hourly visits" style. */ +function axisLabel(unit, ylabel) { + return unit === '5min' ? `${ylabel} / 5 min` : `${freqLabel(unit)} ${ylabel}` +} + /** Legend label for the overlaid past weeks: "Week M" or "Week M–N". */ function pastLabel(series) { const oldest = series.at(-1).label.slice(5) // strip "Week " @@ -63,7 +68,7 @@ const viewChart = computed(() => buildChart(viewSeries.value, now.value)) ]" :key="c.ylabel">