diff --git a/components/dashboard/Chart.tsx b/components/dashboard/Chart.tsx index 56b22eb..f6e4233 100644 --- a/components/dashboard/Chart.tsx +++ b/components/dashboard/Chart.tsx @@ -358,7 +358,10 @@ export default function Chart({ )} -
vs yesterday
+
{(() => { + const days = Math.round((new Date(dateRange.end).getTime() - new Date(dateRange.start).getTime()) / 86400000) + 1 + return days <= 1 ? 'vs yesterday' : `vs previous ${days} days` + })()}
{metric === m.key && (
)}