Commit 4b474a7
2024-11-18 08:33:38
1 parent
bb28347Changed files (1)
app
lib
features
statistics
app/lib/features/statistics/value_graph.dart
@@ -210,8 +210,13 @@ class _ValueGraphPainter extends CustomPainter {
path = Path();
path.moveTo(point.dx, point.dy);
- warnPath?.moveTo(_kLeftLegendWidth, warnValue!);
- warnPath?.lineTo(point.dx, point.dy);
+ // This must not cause #461, #482, or #487.
+ if ((warnValue ?? 0) > point.dy) {
+ warnPath?.moveTo(_kLeftLegendWidth, warnValue!);
+ warnPath?.lineTo(point.dx, point.dy);
+ } else {
+ warnPath?.moveTo(point.dx, point.dy);
+ }
}
}