From 322d0844ee74003385875f976faacfd0e8f44523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 16 May 2026 21:53:07 +0200 Subject: [PATCH] fix(charts): reserve chart-card dimensions to avoid Recharts -1 size warning The scatter-correlation card wrapper relied solely on Tailwind's aspect-ratio utilities to derive its height from width, and explicitly unset any inline height. When the dynamic-loaded chart mounted in place of the h-[180px] skeleton, ResponsiveContainer briefly measured a zero-sized parent before the browser resolved aspect-ratio against the parent's width, emitting a width(-1)/height(-1) console warning. Add a min-h-[180px] floor (matching the loading skeleton) so the wrapper always has a non-zero height at first paint. The aspect-ratio rules continue to drive the final card shape once layout settles. --- src/components/charts/scatter-correlation-chart.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/charts/scatter-correlation-chart.tsx b/src/components/charts/scatter-correlation-chart.tsx index 1183d9ab0..ac2bb5fe0 100644 --- a/src/components/charts/scatter-correlation-chart.tsx +++ b/src/components/charts/scatter-correlation-chart.tsx @@ -91,7 +91,13 @@ export function ScatterCorrelationChart>({ // approximates the previous 250 px shape. return (