Place external source/exit pills near their connection targets

Replace count-sorted, group-centered rows with a spring-like placement:
pills order by their weighted median target x and settle by clamped
coordinate descent, minimizing weighted horizontal connection distance
while keeping the minimum pill spacing.
This commit is contained in:
2026-09-23 07:02:17 +00:00
parent 580ebac06c
commit 7e86efeb9f
2 changed files with 90 additions and 27 deletions
+5 -2
View File
@@ -438,8 +438,11 @@ map: each visit is attributed to `utm_campaign`, then `utm_source`, then the
referer origin, then any other `utm_*` tag, so UTM-tagged visits are grouped
under their campaign/source value rather than the referer domain. A UTM
source node only links to its referer when every visit carrying that tag
came from the same origin. External exits are full-size nodes in a matching
row centered below the map, so the site itself stays in the middle), per-page view
came from the same origin. Within the source and exit rows the pills are
not sorted by count; each slides sideways toward the pages it connects to,
minimizing the weighted horizontal connection distance while keeping a
minimum pill spacing. External exits are full-size nodes in a matching
row below the map, so the site itself stays in the middle), per-page view
counts, the top transitions and the 50 most recent visit trails. Data is
streamed live over `WebSocket /_api/ws/analytics`, which pushes the latest
JSON snapshot on connect and again whenever the analytics file is updated