Commit 37548792 by Torkel Ödegaard Committed by GitHub

Merge pull request #13659 from grafana/graph-time-format-fix

fix for graph time formating for Last 24h ranges
parents d17025fb 551e0843
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment