fix(reporting): resize trend chart and repair closures detail

This commit is contained in:
Deploy
2026-08-25 22:24:11 +02:00
parent ae42bae61e
commit f76591518e
15 changed files with 68 additions and 60 deletions

View File

@@ -19,14 +19,15 @@ export function TrendChart({ data, maxValue, height = 120 }: TrendChartProps) {
const width = 100; // percentage-based SVG
const barWidth = Math.min(3, (width * 0.9) / data.length);
const gap = Math.max(0.2, (width - barWidth * data.length) / (data.length + 1));
const chartHeight = height - 40; // leave room for labels
const chartHeight = height - 34; // leave room for labels
return (
<div className="w-full overflow-x-auto">
<div className="w-full overflow-x-auto rounded-xl bg-white">
<svg
viewBox={`0 0 ${width} ${height}`}
className="w-full"
style={{ minWidth: `${Math.max(300, data.length * 8)}px` }}
className="block w-full"
style={{ minWidth: `${Math.max(360, data.length * 10)}px`, height: `${height}px` }}
preserveAspectRatio="none"
aria-label="Tendencia de ventas"
role="img"
>