From 20f7eee8ccf84a44c03c41986817af2f025f6b38 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Tue, 20 Sep 2016 12:38:18 +0300 Subject: [PATCH] fix(graph): increase Y min and max range when series values are the same, (#6082) fixes #6070, #6050. --- public/vendor/flot/jquery.flot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/vendor/flot/jquery.flot.js b/public/vendor/flot/jquery.flot.js index 45d76b440c3..7159bcee30a 100644 --- a/public/vendor/flot/jquery.flot.js +++ b/public/vendor/flot/jquery.flot.js @@ -1663,8 +1663,10 @@ Licensed under the MIT license. delta = max - min; if (delta == 0.0) { - // degenerate case - var widen = max == 0 ? 1 : 0.01; + // Grafana fix: wide Y min and max using increased wideFactor + // when all series values are the same + var wideFactor = 0.25; + var widen = max == 0 ? 1 : max * wideFactor; if (opts.min == null) min -= widen;