feat: enhance RadarChart component with initial dimensions
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 3s

- Added initial dimensions for height and width based on the compact prop to improve layout handling.
- Updated ResponsiveContainer to utilize the new initialDimension prop for better responsiveness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 14:22:02 +01:00
parent e4a4e5a869
commit 17f5dfbf94

View File

@@ -47,9 +47,15 @@ export function RadarChart({ data, compact }: RadarChartProps) {
if (data.length === 0) return null;
const initialH = compact ? 112 : 288;
const initialW = 300;
return (
<div className={compact ? "h-28 w-full" : "h-72 w-full"}>
<ResponsiveContainer width="100%" height="100%">
<ResponsiveContainer
width="100%"
height="100%"
initialDimension={{ width: initialW, height: initialH }}
>
<RechartsRadar data={data}>
<PolarGrid stroke={c.grid} />
<PolarAngleAxis dataKey="dimension" tick={{ fontSize: compact ? 7 : 9, fill: c.axis }} />