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(
|
||||
sideTitles: titlesData.leftTitles.sideTitles.copyWith(
|
||||
reservedSize: 70,
|
||||
interval: 51,
|
||||
maxIncluded: true,
|
||||
interval: 50,
|
||||
maxIncluded: false,
|
||||
getTitlesWidget: (value, meta) {
|
||||
String text;
|
||||
if (value >= 300) {
|
||||
text = '301+';
|
||||
} else if (value == 255) {
|
||||
text = '300';
|
||||
} else {
|
||||
text = ((value / 50).round() * 50).toInt().toString();
|
||||
}
|
||||
final text = value >= 300 ? '301+' : value.toInt().toString();
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 12),
|
||||
child: FittedBox(
|
||||
|
Reference in New Issue
Block a user