diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx
index 5768a2f6..852d3409 100644
--- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx
+++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx
@@ -62,7 +62,7 @@ export function ListReports({ reports }: ListReportsProps) {
Report
-
+
{reports.map((report) => {
const chartRange = report.range; // timeRanges[report.range];
return (
@@ -122,12 +122,7 @@ export function ListReports({ reports }: ListReportsProps) {
/>
-
+
(
- `SELECT age('days',created_at, now()) as days, count(distinct profile_id) as count FROM events where project_id = ${escape(projectId)} group by days order by days ASC`
+ `SELECT age('days',created_at, now()) as days, count(distinct profile_id) as count FROM events where project_id = ${escape(projectId)} group by days order by days ASC LIMIT 51`
);
- const take = 18;
- const split = take / 2;
- const max = Math.max(...res.map((item) => item.count));
+ const maxValue = Math.max(...res.map((x) => x.count));
+ const minValue = Math.min(...res.map((x) => x.count));
+ const calculateRatio = (currentValue: number) =>
+ Math.max(
+ 0.1,
+ Math.min(1, (currentValue - minValue) / (maxValue - minValue))
+ );
+
const renderItem = (item: Row) => (
-
+
-
+
{item.count} profiles last seen{' '}
{item.days === 0 ? 'today' : `${item.days} days ago`}
-
{item.days}
+
{item.days}
);
+
return (
Last seen
-
- {res.length >= 18 ? (
- <>
- {res.slice(0, split).map(renderItem)}
- {res.slice(-split).map(renderItem)}
- >
- ) : (
- res.map(renderItem)
- )}
+
+ {res.map(renderItem)}
DAYS