"use client" import Chart from 'react-apexcharts'; import { type ApexOptions } from 'apexcharts'; import { useTheme } from "next-themes"; export default function Overview() { const { theme } = useTheme() const barChartDataDailyTraffic = [ { name: "Daily Traffic", data: [ Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, Math.floor(Math.random() * 5000) + 1000, ], }, ]; const barChartOptionsDailyTraffic: ApexOptions = { chart: { toolbar: { show: false, }, }, tooltip: { theme: theme, }, xaxis: { categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], labels: { show: true, style: { colors: theme === 'dark' ? '#fff' : "#707070", }, }, axisBorder: { show: false, }, axisTicks: { show: false, }, }, yaxis: { show: false, labels: { show: true, style: { colors: "#CBD5E0", fontSize: "14px", }, }, }, grid: { show: false, strokeDashArray: 5, yaxis: { lines: { show: true, }, }, xaxis: { lines: { show: false, }, }, }, fill: { type: "gradient", gradient: { type: "vertical", shadeIntensity: 1, opacityFrom: 0.7, opacityTo: 0.9, colorStops: [ [ { offset: 0, color: "#adfa1d", opacity: 1, }, { offset: 100, color: "#00ff00", opacity: 0.28, }, ], ], }, }, dataLabels: { enabled: false, }, plotOptions: { bar: { borderRadius: 5, }, } }; return (
) }