mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(graph): increase Y min and max range when series values are the same, (#6082)
fixes #6070, #6050.
This commit is contained in:
parent
e926b01185
commit
20f7eee8cc
6
public/vendor/flot/jquery.flot.js
vendored
6
public/vendor/flot/jquery.flot.js
vendored
@ -1663,8 +1663,10 @@ Licensed under the MIT license.
|
|||||||
delta = max - min;
|
delta = max - min;
|
||||||
|
|
||||||
if (delta == 0.0) {
|
if (delta == 0.0) {
|
||||||
// degenerate case
|
// Grafana fix: wide Y min and max using increased wideFactor
|
||||||
var widen = max == 0 ? 1 : 0.01;
|
// when all series values are the same
|
||||||
|
var wideFactor = 0.25;
|
||||||
|
var widen = max == 0 ? 1 : max * wideFactor;
|
||||||
|
|
||||||
if (opts.min == null)
|
if (opts.min == null)
|
||||||
min -= widen;
|
min -= widen;
|
||||||
|
Loading…
Reference in New Issue
Block a user