Skip to content

Commit e3ab7d7

Browse files
author
David Buezas
committed
fetch retry delay + remove marker traces hover tooltip
1 parent 0178653 commit e3ab7d7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Cache.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ async function fetchSingleRange(
3838
} catch (e) {
3939
console.error(e);
4040
retries++;
41-
if (retries > 10) return null;
41+
if (retries > 50) return null;
42+
await sleep(100)
4243
}
4344
}
4445
if (!list) return null;

src/plotly-graph-card.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ export class PlotlyGraph extends HTMLElement {
356356
mode: "text+markers",
357357
legendgroup: "group" + traceIdx,
358358
showlegend: false,
359+
hoverinfo: "skip",
359360
textposition: "middle right",
360361
marker: {
361362
color: mergedTrace.line!.color,
@@ -378,6 +379,7 @@ export class PlotlyGraph extends HTMLElement {
378379
marker: {
379380
color: "transparent",
380381
},
382+
hoverinfo: "skip",
381383
showlegend: false,
382384
x: [+Date.now() + timeMargin],
383385
y: mergedTrace.y.slice(-1),
@@ -472,4 +474,4 @@ window.customCards.push({
472474
description: "Plotly in HA", // Optional
473475
});
474476

475-
customElements.define(componentName, PlotlyGraph);
477+
customElements.define(componentName, PlotlyGraph);

0 commit comments

Comments
 (0)