fix: bar chart left rounding by using width calc instead of scaleX

This commit is contained in:
Usman Baig
2026-03-15 13:42:41 +01:00
parent e7907d68bf
commit aba67592bb

View File

@@ -185,9 +185,9 @@ function PageRow({
{/* Background bar */} {/* Background bar */}
{!isOther && barWidth > 0 && ( {!isOther && barWidth > 0 && (
<div <div
className="absolute inset-y-0 left-0 right-0 rounded-lg transition-all origin-left" className="absolute top-0.5 bottom-0.5 left-0.5 rounded-md transition-all"
style={{ style={{
transform: `scaleX(${barWidth / 100})`, width: `calc(${barWidth}% - 4px)`,
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)',
}} }}
/> />