mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
modify left side titles.
This commit is contained in:
@ -37,17 +37,10 @@ abstract final class RangeOfAqiChartsHelper {
|
|||||||
leftTitles: titlesData.leftTitles.copyWith(
|
leftTitles: titlesData.leftTitles.copyWith(
|
||||||
sideTitles: titlesData.leftTitles.sideTitles.copyWith(
|
sideTitles: titlesData.leftTitles.sideTitles.copyWith(
|
||||||
reservedSize: 70,
|
reservedSize: 70,
|
||||||
interval: 51,
|
interval: 50,
|
||||||
maxIncluded: true,
|
maxIncluded: false,
|
||||||
getTitlesWidget: (value, meta) {
|
getTitlesWidget: (value, meta) {
|
||||||
String text;
|
final text = value >= 300 ? '301+' : value.toInt().toString();
|
||||||
if (value >= 300) {
|
|
||||||
text = '301+';
|
|
||||||
} else if (value == 255) {
|
|
||||||
text = '300';
|
|
||||||
} else {
|
|
||||||
text = ((value / 50).round() * 50).toInt().toString();
|
|
||||||
}
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.only(end: 12),
|
padding: const EdgeInsetsDirectional.only(end: 12),
|
||||||
child: FittedBox(
|
child: FittedBox(
|
||||||
|
Reference in New Issue
Block a user