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, )