mirror of
https://github.com/asgeirtj/system_prompts_leaks.git
synced 2026-07-31 09:17:25 +02:00
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.
This commit is contained in:
@@ -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'},
|
||||
|
||||
Reference in New Issue
Block a user