This commit is contained in:
Hillel Coren 2020-02-24 14:26:03 +02:00
parent 0c55801572
commit 2d45e8364c
1 changed files with 7 additions and 5 deletions

View File

@ -477,7 +477,7 @@ class ReportCharts extends StatelessWidget {
charts.MaterialPalette.blue.shadeDefault, charts.MaterialPalette.blue.shadeDefault,
domainFn: (dynamic item, _) => item['name'], domainFn: (dynamic item, _) => item['name'],
measureFn: (dynamic item, _) => item['value'], measureFn: (dynamic item, _) => item['value'],
data: viewModel.groupTotals.totals.keys data: viewModel.groupTotals.rows
.map((key) => { .map((key) => {
'name': key, 'name': key,
'value': viewModel.groupTotals.totals[key] 'value': viewModel.groupTotals.totals[key]
@ -492,7 +492,7 @@ class ReportCharts extends StatelessWidget {
break; break;
case ReportColumnType.date: case ReportColumnType.date:
case ReportColumnType.dateTime: case ReportColumnType.dateTime:
final keys = viewModel.groupTotals.totals.keys final keys = viewModel.groupTotals.rows
.where((element) => element.isNotEmpty) .where((element) => element.isNotEmpty)
.toList(); .toList();
keys.sort((String str1, String str2) => str1.compareTo(str2)); keys.sort((String str1, String str2) => str1.compareTo(str2));
@ -530,10 +530,12 @@ class ReportCharts extends StatelessWidget {
return child == null return child == null
? SizedBox() ? SizedBox()
: FormCard( : FormCard(
child: ClipRect(
child: SizedBox( child: SizedBox(
height: 200, height: 200,
child: child, child: child,
), ),
),
); );
} }
} }