From 8ebe173b8362e41b3287aaf04114d882aae78207 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Thu, 27 Apr 2023 20:13:34 +0200 Subject: [PATCH] fix: retain the last out-of-bounds state (#961) This re-insures the logic to keep the last known state before the start of our grah interval within the history. While this is not really correct, it allows for rendering steady-state-graphs. This element was mistakenly removed in #881. The piece of code relies on history being chronographical. fixes #960 --- src/graph.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graph.js b/src/graph.js index b85f9b6..84697d4 100755 --- a/src/graph.js +++ b/src/graph.js @@ -70,6 +70,8 @@ export default class Graph { const key = Math.floor(Math.abs(interval)); if (!res[key]) res[key] = []; res[key].push(item); + } else { + res[0] = [item]; } return res; }