From bf858bfadd3f4a82aadb4a942bce59f389633376 Mon Sep 17 00:00:00 2001 From: ilovelinux Date: Mon, 20 Jun 2022 10:29:13 +0200 Subject: [PATCH] Fix stats, now they show sunday too --- lib/screens/home_tabs/home.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/home_tabs/home.dart b/lib/screens/home_tabs/home.dart index c4039bf..2d22233 100644 --- a/lib/screens/home_tabs/home.dart +++ b/lib/screens/home_tabs/home.dart @@ -149,9 +149,9 @@ class _WeeklyChartbar extends StatelessWidget { charts.Series( id: 'Bookings', colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault, - domainFn: (int v, _) => shortWeekDays[v], + domainFn: (int v, _) => shortWeekDays[v % 7], measureFn: (int v, _) => bookingsPerWeekDay[v]?.length ?? 0, - data: List.generate(7, (index) => (index + 1) % 7, growable: false), + data: List.generate(7, (index) => index + 1, growable: false), ) ], animate: true,