Skip to content

Commit

Permalink
fix: retain the last out-of-bounds state (#961)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
akloeckner authored Apr 27, 2023
1 parent 18fbf4d commit 8ebe173
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8ebe173

Please sign in to comment.