fix: graph bad state error

This commit is contained in:
Matyáš Caras 2024-02-09 17:07:50 +01:00
parent 1ec32168e5
commit de2791a60d
Signed by untrusted user who does not match committer: hernik
GPG key ID: 2A3175F98820C5C6

View file

@ -186,14 +186,16 @@ class ExpensesLineChart extends StatelessWidget {
topTitles: const AxisTitles(), topTitles: const AxisTitles(),
leftTitles: AxisTitles( leftTitles: AxisTitles(
sideTitles: SideTitles( sideTitles: SideTitles(
reservedSize: (NumberFormat.compact() reservedSize: ((expenseDataSorted.isNotEmpty &&
NumberFormat.compact(locale: locale)
.format(expenseDataSorted.last) .format(expenseDataSorted.last)
.length >= .length >=
5 || 5) ||
NumberFormat.compact() (incomeDataSorted.isNotEmpty &&
NumberFormat.compact(locale: locale)
.format(incomeDataSorted.last) .format(incomeDataSorted.last)
.length >= .length >=
5) 5))
? 50 ? 50
: 25, : 25,
showTitles: true, showTitles: true,