fix: graphs clipping into the bottom of the box

this isn't the greatest solution, but it works as expected
This commit is contained in:
electria 2026-08-15 19:11:34 -07:00
commit 9d0a6fdd07
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -53,7 +53,7 @@ impl canvas::Program<app::Message, Theme, Renderer> 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))
}
}),