所有一级页面和不分二级页面
This commit is contained in:
@@ -87,10 +87,16 @@ class PowerTrendChart extends StatelessWidget {
|
||||
reservedSize: 30,
|
||||
interval: 6,
|
||||
getTitlesWidget: (value, meta) {
|
||||
const titles = ['00:00', '06:00', '12:00', '18:00', '24:00'];
|
||||
if (value.toInt() % 6 == 0 && value.toInt() < titles.length) {
|
||||
final index = value.toInt();
|
||||
if (index == 0 || index == 6 || index == 12 || index == 18 || index == 23) {
|
||||
String time;
|
||||
if (index == 23) {
|
||||
time = '23:00';
|
||||
} else {
|
||||
time = '${index.toString().padLeft(2, '0')}:00';
|
||||
}
|
||||
return Text(
|
||||
titles[value.toInt() ~/ 6],
|
||||
time,
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF86909C),
|
||||
fontSize: 12,
|
||||
|
||||
Reference in New Issue
Block a user