|
|
|
@ -115,16 +115,30 @@ class LineChartCurved extends StatelessWidget {
|
|
|
|
|
//rotateAngle:-65,
|
|
|
|
|
margin: 22,
|
|
|
|
|
getTitles: (value) {
|
|
|
|
|
if (timeSeries.length > value.toInt()) {
|
|
|
|
|
DateTime dateTime = timeSeries[value.toInt()].time;
|
|
|
|
|
if (isDatesSameYear) {
|
|
|
|
|
return monthFormat.format(dateTime);
|
|
|
|
|
if (timeSeries.length < 15) {
|
|
|
|
|
if (timeSeries.length > value.toInt()) {
|
|
|
|
|
DateTime dateTime = timeSeries[value.toInt()].time;
|
|
|
|
|
if (isDatesSameYear) {
|
|
|
|
|
return monthFormat.format(dateTime);
|
|
|
|
|
} else {
|
|
|
|
|
return yearFormat.format(dateTime);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return yearFormat.format(dateTime);
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return '';
|
|
|
|
|
if (value.toInt() == 0 ||
|
|
|
|
|
value.toInt() == timeSeries.length - 1 ||
|
|
|
|
|
xAxixs.contains(value.toInt())) {
|
|
|
|
|
DateTime dateTime = timeSeries[value.toInt()].time;
|
|
|
|
|
if (isDatesSameYear) {
|
|
|
|
|
return monthFormat.format(dateTime);
|
|
|
|
|
} else {
|
|
|
|
|
return yearFormat.format(dateTime);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*if (timeSeries.length < 15) {
|
|
|
|
|
if (timeSeries.length > value.toInt()) {
|
|
|
|
|
DateTime dateTime = timeSeries[value.toInt()].time;
|
|
|
|
@ -232,7 +246,7 @@ class LineChartCurved extends StatelessWidget {
|
|
|
|
|
final LineChartBarData lineChartBarData1 = LineChartBarData(
|
|
|
|
|
spots: spots,
|
|
|
|
|
isCurved: true,
|
|
|
|
|
colors: [Colors.red]/*[Theme.of(context).primaryColor]*/,
|
|
|
|
|
colors: [Colors.red] /*[Theme.of(context).primaryColor]*/,
|
|
|
|
|
barWidth: 5,
|
|
|
|
|
isStrokeCapRound: true,
|
|
|
|
|
dotData: FlDotData(
|
|
|
|
|