fix: cap inline bar chart max width at 75%

Prevents the top item from spanning full width, making bars
read more clearly as proportional indicators.
This commit is contained in:
Usman Baig
2026-03-16 12:44:32 +01:00
parent 4f419f8b04
commit 3b09758881
7 changed files with 7 additions and 7 deletions

View File

@@ -115,7 +115,7 @@ export default function TopReferrers({ referrers, collectReferrers = true, siteI
<>
{displayedReferrers.map((ref) => {
const maxPv = displayedReferrers[0]?.pageviews ?? 0
const barWidth = maxPv > 0 ? (ref.pageviews / maxPv) * 100 : 0
const barWidth = maxPv > 0 ? (ref.pageviews / maxPv) * 75 : 0
return (
<div
key={ref.referrer}