Skip to content

Commit

Permalink
bug fix - agg results not rendered when vis first created
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Nov 30, 2016
1 parent 41cfbd5 commit 5dafc6c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions public/visController.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,12 @@ define(function (require) {
buildChartData: buildChartData,
process: function(resp) {
const aggs = resp.aggregations;
let numGeoBuckets = 0;
_.keys(aggs).forEach(function(key) {
if(_.has(aggs[key], "filtered_geohash")) {
aggs[key].buckets = aggs[key].filtered_geohash.buckets;
delete aggs[key].filtered_geohash;
numGeoBuckets = aggs[key].buckets.length;
}
});
console.log("geogrids: " + numGeoBuckets);
if(numGeoBuckets === 0) return null;

const chartData = this.buildChartData(resp);
const geoMinMax = utils.getGeoExtents(chartData);
Expand Down

0 comments on commit 5dafc6c

Please sign in to comment.