Parcourir la source

Fix for histogram without time filter

Rashid Khan il y a 12 ans
Parent
commit
a118cf42ae
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      panels/histogram/module.js

+ 2 - 2
panels/histogram/module.js

@@ -327,8 +327,8 @@ angular.module('kibana.histogram', [])
                 timezone: scope.panel.timezone,
                 timezone: scope.panel.timezone,
                 show: scope.panel['x-axis'],
                 show: scope.panel['x-axis'],
                 mode: "time",
                 mode: "time",
-                min: scope.range.from.getTime(),
-                max: scope.range.to.getTime(),
+                min: _.isUndefined(scope.range.from) ? null : scope.range.from.getTime(),
+                max: _.isUndefined(scope.range.to) ? null : scope.range.to.getTime(),
                 timeformat: time_format(scope.panel.interval),
                 timeformat: time_format(scope.panel.interval),
                 label: "Datetime",
                 label: "Datetime",
               },
               },