import React from 'react'; import { ResponsiveContainer, XAxis, YAxis, CartesianGrid, Tooltip, BarChart, Bar, } from 'recharts'; import domain from 'Components/Dashboard/Widgets/common/domain'; import { DateTime } from 'luxon'; import { useTranslation } from 'react-i18next'; function CustomTooltip({ active, payload, label, timeFormat = 'hh:mm a' }) { const { t } = useTranslation(); if (active) { const p = payload[0].payload; const dateStr = DateTime.fromMillis(p.timestamp).toFormat(timeFormat); return (

{dateStr}

{t('Sessions:')} {p.count}

); } return null; } function Trend({ title = '', chart, onDateChange, timeFormat = 'hh:mm a' }) { const { t } = useTranslation(); if (!Array.isArray(chart)) return null; const getDateFormat = (val) => { const d = new Date(val); return `${d.getMonth() + 1}/${d.getDate()}`; }; return ( <>

{title}

{/* */}
} /> ); } Trend.displayName = 'Trend'; export default Trend;