|
|
|
|
@ -111,6 +111,7 @@ class ShowChart extends StatelessWidget {
|
|
|
|
|
bottomTitles: AxisTitles(
|
|
|
|
|
sideTitles: SideTitles(
|
|
|
|
|
showTitles: true,
|
|
|
|
|
|
|
|
|
|
getTitlesWidget: (value, title) {
|
|
|
|
|
TextStyle style = TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
@ -119,37 +120,43 @@ class ShowChart extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
if (isWeeklyOrMonthly) {
|
|
|
|
|
return Text(
|
|
|
|
|
'${timeSeries![value.toInt()].time.day}/ ${timeSeries![value.toInt()].time.month}',
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year.toString().substring(2)}',
|
|
|
|
|
style: style,
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
if (timeSeries!.length < 15) {
|
|
|
|
|
if (timeSeries!.length > value.toInt()) {
|
|
|
|
|
return Text(
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}',
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year.toString().substring(2)}',
|
|
|
|
|
style: style,
|
|
|
|
|
);
|
|
|
|
|
} else
|
|
|
|
|
return SizedBox();
|
|
|
|
|
return Text(
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year.toString().substring(2)}',
|
|
|
|
|
style: style,
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
if (value.toInt() == 0)
|
|
|
|
|
return Text(
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}',
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year.toString().substring(2)}',
|
|
|
|
|
style: style,
|
|
|
|
|
);
|
|
|
|
|
if (value.toInt() == timeSeries!.length - 1)
|
|
|
|
|
return Text(
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}',
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year.toString().substring(2)}',
|
|
|
|
|
style: style,
|
|
|
|
|
);
|
|
|
|
|
if (xAxixs.contains(value.toInt())) {
|
|
|
|
|
return Text(
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}',
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year.toString().substring(2)}',
|
|
|
|
|
style: style,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return SizedBox();
|
|
|
|
|
return Text(
|
|
|
|
|
'${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year.toString().substring(2)}',
|
|
|
|
|
style: style,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|