From fa0284f1650ddd757994ea13ae0c7b77961d7ff2 Mon Sep 17 00:00:00 2001 From: electria Date: Sat, 15 Aug 2026 19:08:05 -0700 Subject: [PATCH 1/2] feat: half the history this should probably be dynamic (based on screen space).... somehow.... --- src/app/graph.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/graph.rs b/src/app/graph.rs index c16fe56..9ae9c10 100644 --- a/src/app/graph.rs +++ b/src/app/graph.rs @@ -27,7 +27,7 @@ impl Graph { pub fn update(&mut self, value: f32) { self.timeline.push_back(value); - if self.timeline.len() > 1000 { + if self.timeline.len() > 500 { self.timeline.pop_front(); } } From 9d0a6fdd07ed55b890d9d8575200f60735479cb5 Mon Sep 17 00:00:00 2001 From: electria Date: Sat, 15 Aug 2026 19:11:34 -0700 Subject: [PATCH 2/2] fix: graphs clipping into the bottom of the box this isn't the greatest solution, but it works as expected --- src/app/graph.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/graph.rs b/src/app/graph.rs index 9ae9c10..cdbd212 100644 --- a/src/app/graph.rs +++ b/src/app/graph.rs @@ -53,7 +53,7 @@ impl canvas::Program for Graph { &canvas::Path::new(|builder| { for (index, value) in self.timeline.iter().enumerate() { let x = index as f32 / self.timeline.len() as f32 * bounds.width; - let y = bounds.height - value / 100. * bounds.height; + let y = bounds.height - value / 100. * bounds.height - 1.; builder.line_to(Point::new(x, y)) } }),