From 7252800c530cb67e9d961858a2f826471ccd8b81 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Mon, 26 Aug 2013 16:21:26 -0700 Subject: [PATCH] Restored the "required_times" functionality so that stacking will work as expected. --- panels/histogram/module.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panels/histogram/module.js b/panels/histogram/module.js index fe7de099773..4558b3ee039 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -392,9 +392,9 @@ angular.module('kibana.histogram', []) // so that the stacking happens in the proper order var required_times = []; if (scope.panel.bars && stack) { - required_times = Array.prototype.concat.apply([], _.map(scope.data, function (series) { - return series.time_series.getOrderedTimes(); - })); + required_times = _.uniq(Array.prototype.concat.apply([], _.map(scope.data, function (query) { + return query.time_series.getOrderedTimes(); + })).sort(), true); } for (var i = 0; i < scope.data.length; i++) { @@ -532,11 +532,11 @@ angular.module('kibana.histogram', []) * @return {array} An array of integer times. */ this.ZeroFilled.prototype.getOrderedTimes = function (include) { - var times = _.map(_.keys(this._data), base10Int).sort(); + var times = _.map(_.keys(this._data), base10Int); if (_.isArray(include)) { times = times.concat(include); } - return times; + return _.uniq(times.sort(), true); }; /**