import { msg } from '@lingui/core/macro'; import { useLingui } from '@lingui/react'; import { Trans } from '@lingui/react/macro'; import type { MonthlyStats } from '@documenso/lib/server-only/analytics'; import { MonthlyActiveUsersChart } from '~/components/general/admin-monthly-active-user-charts'; export type AnalyticsChartsProps = { monthlyData?: MonthlyStats; showActiveUsers?: boolean; }; export const AnalyticsCharts = ({ monthlyData, showActiveUsers = false }: AnalyticsChartsProps) => { const { _ } = useLingui(); if (!monthlyData) { return null; } // Ensure all data has cume_count for chart compatibility const formatDataForChart = (data: MonthlyStats) => { return data.map((item) => ({ ...item, count: item.count, cume_count: item.cume_count || 0, })); }; return (