From 02091438b49d72d7cbff57f920ae5d1bbed8314a Mon Sep 17 00:00:00 2001 From: Rahix Date: Mon, 25 Aug 2025 20:18:36 +0200 Subject: [PATCH] Fix single column graph display When receiving only a single column of data, no graph would ever show up. This was due to the graph display data structure only being initialized when the number of datasets changes. However, the dataset attribute is populated with one entry by default, so when receiving a single column of data, the graph initialization never happens. Fix this by initializing the dataset structure to be empty by default. This bug was introduced in PR #119. Fixes: https://github.com/hacknus/serial-monitor-rust/pull/119 --- src/data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data.rs b/src/data.rs index 52b4a7e..efbe8ec 100644 --- a/src/data.rs +++ b/src/data.rs @@ -57,7 +57,7 @@ impl Default for DataContainer { DataContainer { time: vec![], absolute_time: vec![], - dataset: vec![vec![]], + dataset: vec![], raw_traffic: vec![], loaded_from_file: false, }