'use client'; import { FeatureCardContainer } from '@/components/feature-card'; import { MoreVerticalIcon } from 'lucide-react'; import { useMemo, useState } from 'react'; import { Bar, CartesianGrid, Cell, ComposedChart, Line, ResponsiveContainer, Tooltip, XAxis, YAxis, } from 'recharts'; // Sample data for the last 7 days const data = [ { day: 'Mon', visitors: 1200, revenue: 1250 }, { day: 'Tue', visitors: 1450, revenue: 1890 }, { day: 'Wed', visitors: 1320, revenue: 1520 }, { day: 'Thu', visitors: 1580, revenue: 2100 }, { day: 'Fri', visitors: 1420, revenue: 1750 }, { day: 'Sat', visitors: 1180, revenue: 1100 }, { day: 'Sun', visitors: 1250, revenue: 1380 }, ]; // Custom tooltip component const CustomTooltip = ({ active, payload, label }: any) => { if (active && payload && payload.length) { const visitors = payload.find((p: any) => p.dataKey === 'visitors')?.value || 0; const revenue = payload.find((p: any) => p.dataKey === 'revenue')?.value || 0; return (
Last 7 days