diff --git a/graph.core.js b/graph.core.js index 8757bb9..1e33513 100644 --- a/graph.core.js +++ b/graph.core.js @@ -162,6 +162,19 @@ const GraphLayoutApp = { menu?.show_l3?.(); }); } + else { + // automatic refresh every 60s < interval < 1 day + var refresh = Math.min(Math.max(60, this.state.interval / 2), 86400); + var parent = this; + window.setInterval(function() { + if (parent.state.floatingtime) { + parent.onGraphTimeRefresh(); + } + else { + parent.onReload(); + } + }, refresh * 1000); // ms + } this._onHashChange = this.onSavedHashChange.bind(this); this._onColorModeChange = () => this.renderChart();