From 551e0843fa569cd7dae17904aa06a67525f8abd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 12 Oct 2018 21:51:21 -0700 Subject: [PATCH] fix for graph time formating for Last 24h ranges, fixes #13650 --- public/app/plugins/panel/graph/graph.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 33db0e7220a..7a8e24539f7 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -713,7 +713,9 @@ class GraphElement { if (min && max && ticks) { const range = max - min; const secPerTick = range / ticks / 1000; - const oneDay = 86400000; + // Need have 10 milisecond margin on the day range + // As sometimes last 24 hour dashboard evaluates to more than 86400000 + const oneDay = 86400010; const oneYear = 31536000000; if (secPerTick <= 45) {