From f7264b8f594859c1430bd13e765db03002842d38 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 23 Aug 2026 11:18:06 +0200 Subject: Add normalized difficulty versus moving duration to analytics Extend analytics with a second scatter plotting Cotacol per 100 km against moving hours, keep speed versus Cotacol as first chart, render both canvases from shared points, open ride detail in a new tab on dot click, and keep all website copy in English. --- web/templates.templ | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'web/templates.templ') diff --git a/web/templates.templ b/web/templates.templ index 0660d07..9be2daf 100644 --- a/web/templates.templ +++ b/web/templates.templ @@ -100,7 +100,7 @@ templ AnalyticsPage(data AnalyticsPageData) { templ AnalyticsContent(data AnalyticsPageData) {

Analytics

Ride analytics

-

One point per ride: average speed on the x axis, Cotacol per 100 km on the y axis.

+

One point per ride — first chart: average speed vs. Cotacol per 100 km; second chart: normalized difficulty (Cotacol per 100 km) vs. moving duration.

@@ -130,6 +130,24 @@ templ AnalyticsContent(data AnalyticsPageData) { Hover a point to inspect a ride. }
+
+
+

Chart

Normalized difficulty vs moving duration

+ if len(data.Points) > 0 { + { formatRideCount(len(data.Points)) } + } +
+ if len(data.Points) == 0 { + if data.Filter.Active { +
No rides match the selected filters. Clear filters.
+ } else { +
No eligible rides yet. Import rides to see the chart.
+ } + } else { +
+ Hover a point to inspect a ride. + } +
@templ.JSONScript("analytics-points", data.Points) -- cgit v1.3