modify left side titles.

This commit is contained in:
Faris Armoush
2025-05-27 12:21:59 +03:00
parent 1b0d8d446c
commit f5d926f5a2

View File

@ -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(