Fixed chart.

This commit is contained in:
Mike Cao 2024-06-19 22:22:18 -07:00
parent b1024c71de
commit 3217ef3df3
2 changed files with 18 additions and 18 deletions

View file

@ -18,12 +18,12 @@ export function RealtimeChart({ data, unit, ...props }: RealtimeChartProps) {
const chartData = useMemo(() => {
if (!data) {
return { views: [], visitors: [] };
return { pageviews: [], sessions: [] };
}
return {
views: getDateArray(data.series.views, startDate, endDate, unit),
visitors: getDateArray(data.series.visitors, startDate, endDate, unit),
pageviews: getDateArray(data.series.views, startDate, endDate, unit),
sessions: getDateArray(data.series.visitors, startDate, endDate, unit),
};
}, [data, startDate, endDate, unit]);