From 42c7a4654c6e79d051bad839a86a951e745b58fd Mon Sep 17 00:00:00 2001 From: Patel Dipesh <69524619+dipeshpatel02@users.noreply.github.com> Date: Wed, 12 Jun 2024 15:25:56 +0530 Subject: [PATCH] bar are not shown properly cause of condition --- Lecture Attachments/05 Interactivity & Theming/chart/chart.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lecture Attachments/05 Interactivity & Theming/chart/chart.dart b/Lecture Attachments/05 Interactivity & Theming/chart/chart.dart index d97c89b7..64d170c8 100644 --- a/Lecture Attachments/05 Interactivity & Theming/chart/chart.dart +++ b/Lecture Attachments/05 Interactivity & Theming/chart/chart.dart @@ -60,7 +60,7 @@ class Chart extends StatelessWidget { children: [ for (final bucket in buckets) // alternative to map() ChartBar( - fill: bucket.totalExpenses == 0 + fill: maxTotalExpense == 0 ? 0 : bucket.totalExpenses / maxTotalExpense, )