From 5fa8d1fa3de4ce8fb186a65c1dc8255b6f5d77d7 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Fri, 11 Jul 2025 10:49:19 +0200 Subject: [PATCH] Added comment to jitter calculation --- lib/presentation/views/graph_view.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/presentation/views/graph_view.dart b/lib/presentation/views/graph_view.dart index 50fb12a..7736bb1 100644 --- a/lib/presentation/views/graph_view.dart +++ b/lib/presentation/views/graph_view.dart @@ -91,6 +91,9 @@ class _GraphViewState extends State { cumulativeScores[i].length, (j) => ( j + 1, + + // Add a small jitter to the cumulative scores to prevent overlapping data points in the graph. + // The jitter is centered around zero by subtracting playerCount ~/ 2 from the player index i. cumulativeScores[i][j] + (i - playerCount ~/ 2) * jitterStep ), );