diff --git a/dashboard/src/components/GraphItem.vue b/dashboard/src/components/GraphItem.vue index 5d95e5814..bf5534bd9 100644 --- a/dashboard/src/components/GraphItem.vue +++ b/dashboard/src/components/GraphItem.vue @@ -200,8 +200,10 @@ function pruneGraphData(dataset, options) { } function advance() { - graph.options.scales.x.min += LIVE_REFRESH_INTERVAL_MSECS; - graph.options.scales.x.max += LIVE_REFRESH_INTERVAL_MSECS; + // advance is called in a timer and when the browser tab is in the background , it is unreliable. Use absolute time to set the scale + const now = Date.now(); + graph.options.scales.x.min = now - 5*60*1000; + graph.options.scales.x.max = now; graph.update('none'); }