import React from "react"; import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer, Cell } from "recharts"; const COLORS = ["#6366f1", "#8b5cf6", "#a78bfa", "#c4b5fd", "#818cf8", "#6d28d9", "#4f46e5"]; export default function SectorExposure({ data }) { if (!data) return null; const chartData = data.sector_breakdown.map((s) => ({ name: s.sector, weight: +(s.weight * 100).toFixed(1), })); return (

Sector Exposure

Concentration Risk {data.concentration_risk}
HHI Index {data.hhi.toFixed(3)}
Sectors {data.sector_breakdown.length}

Sector Weights

`${v}%`} /> `${v}%`} /> {chartData.map((_, i) => ( ))}

Holdings Detail

{data.holdings.map((h, i) => ( ))}
TickerSectorIndustryWeight
{h.ticker} {h.sector} {h.industry} {(h.weight * 100).toFixed(1)}%
); }