Skip to content

Commit 875b86e

Browse files
committed
Fix All Referrers chart showing numeric indices instead of source names
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.
1 parent 34e15c1 commit 875b86e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/scripts/accumulate-traffic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ def build_dashboard(publish_dir, ref_history, path_history, star_history):
392392
series:[{name:'Peak 14-day views',data:allRefs.map(([,d])=>d.count)},{name:'Unique',data:allRefs.map(([,d])=>d.uniques)}],
393393
colors:['#6366f1','#f59e0b'],
394394
plotOptions:{bar:{horizontal:true,borderRadius:4,barHeight:'65%',dataLabels:{position:'top'}}},
395-
xaxis:{labels:{formatter:v=>v>=1000?(v/1000).toFixed(0)+'k':v}},
396-
yaxis:{labels:{style:{fontSize:'11px'}},categories:allRefs.map(([n])=>n)},
395+
xaxis:{categories:allRefs.map(([n])=>n),labels:{formatter:v=>v>=1000?(v/1000).toFixed(0)+'k':v}},
396+
yaxis:{labels:{style:{fontSize:'11px'}}},
397397
dataLabels:{enabled:false},
398398
tooltip:{y:{formatter:v=>fmt(v)}},
399399
legend:{position:'top',horizontalAlign:'left',fontSize:'12px'},

0 commit comments

Comments
 (0)