diff --git a/apps/rebreak-native/components/mail/MailDistributionChart.tsx b/apps/rebreak-native/components/mail/MailDistributionChart.tsx index 0219a8c..b636e85 100644 --- a/apps/rebreak-native/components/mail/MailDistributionChart.tsx +++ b/apps/rebreak-native/components/mail/MailDistributionChart.tsx @@ -112,7 +112,7 @@ export function MailDistributionChart({ data, hero, totalBlocked, isLegend }: Pr centerLabel={centerLabel} width={DONUT_WIDTH} /> - + {slices.map((slice) => ( ))} @@ -159,26 +159,35 @@ function LegendRow({ colors: ReturnType; }) { return ( - - - - {slice.label} - + + + + + {slice.label} + + 0 && days <= 7) { - // Short window: keep only days with data + days between first and last hit + } else if (nonEmpty.length > 0 && nonEmpty.length * 3 < raw.length) { + // Sparse data (z.B. nur 1-2 Tage von 30): zoom in auf die echte Range + // zwischen erstem und letztem Hit. Vermeidet 30 leere Bars + 1 Bar + // ganz rechts wie bei einer frischen Outlook-Connection. const firstDate = nonEmpty[0].date; const lastDate = nonEmpty[nonEmpty.length - 1].date; data = raw.filter((e) => e.date >= firstDate && e.date <= lastDate);