From 875b86e8c5d5c3d89f9c71dec10051df9cc4ac2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81sgeir=20Thor=20Johnson?= Date: Thu, 18 Jun 2026 23:51:08 +0000 Subject: [PATCH] Fix All Referrers chart showing numeric indices instead of source names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit categories belong under xaxis in ApexCharts (even for horizontal bars); they were under yaxis, so Apex fell back to numeric category indices. Moved them to xaxis.categories — left axis now labels each bar with its referrer domain. --- .github/scripts/accumulate-traffic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/accumulate-traffic.py b/.github/scripts/accumulate-traffic.py index 70350f8..768a73e 100644 --- a/.github/scripts/accumulate-traffic.py +++ b/.github/scripts/accumulate-traffic.py @@ -392,8 +392,8 @@ new ApexCharts(document.getElementById('allRefsChart'), { series:[{name:'Peak 14-day views',data:allRefs.map(([,d])=>d.count)},{name:'Unique',data:allRefs.map(([,d])=>d.uniques)}], colors:['#6366f1','#f59e0b'], plotOptions:{bar:{horizontal:true,borderRadius:4,barHeight:'65%',dataLabels:{position:'top'}}}, - xaxis:{labels:{formatter:v=>v>=1000?(v/1000).toFixed(0)+'k':v}}, - yaxis:{labels:{style:{fontSize:'11px'}},categories:allRefs.map(([n])=>n)}, + xaxis:{categories:allRefs.map(([n])=>n),labels:{formatter:v=>v>=1000?(v/1000).toFixed(0)+'k':v}}, + yaxis:{labels:{style:{fontSize:'11px'}}}, dataLabels:{enabled:false}, tooltip:{y:{formatter:v=>fmt(v)}}, legend:{position:'top',horizontalAlign:'left',fontSize:'12px'},