We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2eb71c commit 2499e2bCopy full SHA for 2499e2b
src/cache/Cache.ts
@@ -161,6 +161,10 @@ export default class Cache {
161
// and https://github.com/dbuezas/lovelace-plotly-graph-card/commit/3d915481002d03011bcc8409c2dcc6e6fb7c8674#r94899109
162
y === "unavailable" || y === "none" || y === "unknown" ? null : y
163
);
164
+ /**
165
+ * ToDo: offset traces should also be extended, but only up to the limits of the fetched range
166
+ * Otherwise, the datapoint can go way into the future and mess up auto-ranging.
167
+ */
168
if (entity.extend_to_present && data.xs.length > 0 && entity.offset === 0) {
169
const last_i = data.xs.length - 1;
170
data.xs.push(new Date(Date.now() + entity.offset));
0 commit comments