This commit is contained in:
wyf
2025-05-22 08:56:27 +08:00
parent 489e907e00
commit 8a418c9c98
39 changed files with 5964 additions and 144 deletions

View File

@@ -154,19 +154,19 @@ class _LineChartByRangePainter extends CustomPainter {
int totalHours = maxTime.difference(minTime).inHours;
int startHour = minTime.hour;
for (int i = 1; i < totalHours; i++) {
double x = xStart + chartWidth * i / totalHours;
// for (int i = 1; i < totalHours; i++) {
// double x = xStart + chartWidth * i / totalHours;
// 垂直虚线
drawDashedLine(
canvas,
Offset(x, 0),
Offset(x, chartHeight),
axisPaint,
dashWidth: 4.rpx,
dashSpace: 4.rpx,
);
}
// // 垂直虚线
// drawDashedLine(
// canvas,
// Offset(x, 0),
// Offset(x, chartHeight),
// axisPaint,
// dashWidth: 4.rpx,
// dashSpace: 4.rpx,
// );
// }
// 5. 画左侧完整时分 (HH:mm),往内缩 labelInset
String leftLabel = DateFormat('HH:mm').format(minTime);