import React from 'react'; import { LineChart, Line, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts'; import { TrendingUp, TrendingDown, Users, DollarSign, ShoppingCart, Activity } from 'lucide-react'; /** * Executive Dashboard Example * * High-level KPIs for leadership with: * - Revenue, users, conversion, growth metrics * - Trend indicators (up/down) * - Comparison to previous period * - Revenue trend chart (6 months) * - Top products bar chart */ interface KPICardProps { title: string; value: string; change: number; changeLabel: string; icon: React.ReactNode; positive?: boolean; } function KPICard({ title, value, change, changeLabel, icon, positive = true }: KPICardProps) { const isPositive = change >= 0; const trendColor = (isPositive && positive) || (!isPositive && !positive) ? '#10b981' : '#ef4444'; return (
{title}
{icon}
{value}
{isPositive ? ( ) : ( )} {Math.abs(change)}% {changeLabel}
); } const revenueData = [ { month: 'Jul', revenue: 42000 }, { month: 'Aug', revenue: 45000 }, { month: 'Sep', revenue: 51000 }, { month: 'Oct', revenue: 49000 }, { month: 'Nov', revenue: 58000 }, { month: 'Dec', revenue: 63000 }, ]; const productData = [ { product: 'Pro Plan', sales: 125000 }, { product: 'Enterprise', sales: 98000 }, { product: 'Starter', sales: 67000 }, { product: 'Add-ons', sales: 34000 }, ]; export function ExecutiveDashboard() { return (

Executive Dashboard

{/* KPI Cards */}
} positive={true} /> } positive={true} /> } positive={true} /> } positive={true} />
{/* Charts Grid */}
{/* Revenue Trend */}

Revenue Trend (6 Months)

{/* Top Products */}

Revenue by Product

`$${value.toLocaleString()}`} />
); } export default ExecutiveDashboard;