更新
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user