fix: bar chart overflow by using scaleX instead of width percentage

This commit is contained in:
Usman Baig
2026-03-15 13:33:10 +01:00
parent de16991bb3
commit 342bf46946

View File

@@ -183,11 +183,11 @@ function PageRow({
`} `}
> >
{/* Background bar */} {/* Background bar */}
{!isOther && ( {!isOther && barWidth > 0 && (
<div <div
className="absolute inset-y-1 left-1 rounded transition-all" className="absolute inset-y-1 left-1 right-1 rounded transition-all origin-left"
style={{ style={{
width: `${barWidth}%`, transform: `scaleX(${barWidth / 100})`,
backgroundColor: isSelected ? 'rgba(253, 94, 15, 0.15)' : 'rgba(253, 94, 15, 0.08)', backgroundColor: isSelected ? 'rgba(253, 94, 15, 0.15)' : 'rgba(253, 94, 15, 0.08)',
}} }}
/> />