diff --git a/.github/scripts/accumulate-traffic.py b/.github/scripts/accumulate-traffic.py index 768a73e..e8b3aa5 100644 --- a/.github/scripts/accumulate-traffic.py +++ b/.github/scripts/accumulate-traffic.py @@ -208,6 +208,8 @@ DASHBOARD_TEMPLATE = r"""
Drag to zoom — click Reset to restore
Bars show stars gained per day · drag to zoom
Page Trends — daily 14-day view count for the top pages
+Referrer Trends
Page Trends
-Day Detail
Daily Clones
@@ -420,15 +420,15 @@ new ApexCharts(document.getElementById('refTrendChart'), { const allPathNames = new Set(); DATA.paths_series.forEach(s=>s.paths.forEach(p=>allPathNames.add(p.path))); -const topPathNames = [...allPathNames].map(n=>({n,c:(allPathsMap[n]||{count:0}).count})).sort((a,b)=>b.c-a.c).slice(0,6).map(x=>x.n); +const topPathNames = [...allPathNames].map(n=>({n,c:(allPathsMap[n]||{count:0}).count})).sort((a,b)=>b.c-a.c).slice(0,8).map(x=>x.n); new ApexCharts(document.getElementById('pathTrendChart'), { ...baseOpts, - chart:{...baseOpts.chart, type:'line', height:320, zoom:{enabled:true,type:'x'}}, + chart:{...baseOpts.chart, type:'line', height:380, zoom:{enabled:true,type:'x'}}, series:topPathNames.map((name,i)=>({ name:shortenPath(name), data:DATA.paths_series.map(s=>{const p=s.paths.find(x=>x.path===name); return [new Date(s.date).getTime(), p?p.count:null];}) })), - colors:colors.slice(0,6), + colors:colors.slice(0,8), stroke:{curve:'smooth',width:2}, xaxis:{type:'datetime'}, yaxis:{labels:{formatter:v=>v>=1000?(v/1000).toFixed(1)+'k':v}}, @@ -449,15 +449,15 @@ function showDayDetail(date) { let html = '| Page | Views | |
|---|---|---|
| ${shortenPath(p.path)} | ${fmt(p.count)} |
| Page | Views | Unique |
|---|---|---|
| ${shortenPath(p.path)} | ${fmt(p.count)} | ${fmt(p.uniques)} |