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 (
| Ticker | Sector | Industry | Weight |
|---|---|---|---|
| {h.ticker} | {h.sector} | {h.industry} | {(h.weight * 100).toFixed(1)}% |