Updated Y-Axis and removed values under y = 0

This commit is contained in:
2025-07-13 00:37:16 +02:00
parent 97da4cadff
commit 0b1b71e227
2 changed files with 8 additions and 5 deletions

View File

@@ -40,7 +40,10 @@ class _GraphViewState extends State<GraphView> {
interval: 1, interval: 1,
decimalPlaces: 0, decimalPlaces: 0,
), ),
primaryYAxis: const NumericAxis(), primaryYAxis: const NumericAxis(
interval: 1,
decimalPlaces: 0,
),
series: getCumulativeScores(), series: getCumulativeScores(),
), ),
) )
@@ -82,7 +85,7 @@ class _GraphViewState extends State<GraphView> {
} }
} }
const double jitterStep = 0.05; const double jitterStep = 0.03;
/// Create a list of LineSeries for each player /// Create a list of LineSeries for each player
/// Each series contains data points for each round /// Each series contains data points for each round
@@ -91,8 +94,8 @@ class _GraphViewState extends State<GraphView> {
cumulativeScores[i].length + 1, cumulativeScores[i].length + 1,
(j) => ( (j) => (
j, j,
j == 0 j == 0 || cumulativeScores[i][j - 1] == 0
? 0 // 0 Points at at the start of the game ? 0 // 0 Points at at the start of the game OR value is 0 (dont subtract jitter step)
// Adds a small jitter to the cumulative scores to prevent overlapping data points in the graph. // Adds 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. // The jitter is centered around zero by subtracting playerCount ~/ 2 from the player index i.

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo" description: "Mobile app for the card game Cabo"
publish_to: 'none' publish_to: 'none'
version: 0.4.3+481 version: 0.4.3+483
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4