From 0515c34017706e43588644387b68a6bb08cc390c Mon Sep 17 00:00:00 2001 From: gennyble Date: Tue, 14 Oct 2025 16:04:50 -0500 Subject: scale graphs 1/3rd higher than max --- src/gatherer.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gatherer.rs b/src/gatherer.rs index 329bc1e..9bfd63a 100644 --- a/src/gatherer.rs +++ b/src/gatherer.rs @@ -171,10 +171,12 @@ pub fn make_net_graph(state: &AwakeState) { mixed.sort(); let kinda_highest = mixed[511 - 32]; - let high_bound = (kinda_highest as f32 / NET_INCREMENTS as f32) + // We add one here so we have less "surface area" covered by the lines + // which makes the vertical divisions look btter + let high_bound = ((kinda_highest as f32 / NET_INCREMENTS as f32) .ceil() .max(1.0) as usize - * NET_INCREMENTS; + + 1) * NET_INCREMENTS; state .netinfo_upper_bound @@ -224,7 +226,9 @@ pub fn make_cpu_graph(state: &AwakeState) { ); // high_vound unit: hundreths of a second (1% / 1) - let high_bound = kinda_highest.max(1.0); + // scaling by 1.33 here to drive the line down to decrease the apparent + // "surface area" of the line + let high_bound = (kinda_highest * 1.33).max(1.0); state .cpuinfo_upper_bound .store(high_bound as usize, Ordering::Release); -- cgit 1.4.1-3-g733a5