').attr('id', 'vislib-vis-fixtures').appendTo('body');
+var count = 0;
+var visHeight = $visCanvas.height();
+
+$visCanvas.new = function () {
+ count += 1;
+ if (count > 1) $visCanvas.height(visHeight * count);
+ return $('
').addClass('visualize-chart').appendTo($visCanvas);
+};
+
+afterEach(function () {
+ $visCanvas.empty();
+ if (count > 1) $visCanvas.height(visHeight);
+ count = 0;
+});
+
+module.exports = function VislibFixtures(Private) {
+ return function (visLibParams) {
+ var Vis = Private(require('ui/vislib/vis'));
+ return new Vis($visCanvas.new(), _.defaults({}, visLibParams || {}, {
+ shareYAxis: true,
+ addTooltip: true,
+ addLegend: true,
+ defaultYExtents: false,
+ setYExtents: false,
+ yAxis: {},
+ type: 'histogram'
+ }));
+ };
+};
diff --git a/bin/fixtures/vislib/mock_data/date_histogram/_columns.js b/bin/fixtures/vislib/mock_data/date_histogram/_columns.js
new file mode 100644
index 00000000000000..6fa4d1ee8aad29
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/date_histogram/_columns.js
@@ -0,0 +1,264 @@
+var moment = require('moment');
+
+module.exports = {
+ 'columns': [
+ {
+ 'label': '200: response',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'interval': 30000,
+ 'min': 1415826608440,
+ 'max': 1415827508440
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ },
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 1415826600000,
+ 'y': 4
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 8
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 7
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 5
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 5
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 4
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 10
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 7
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 9
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 8
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 9
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 8
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 3
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 9
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 6
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 8
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 7
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 4
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 6
+ },
+ {
+ 'x': 1415827170000,
+ 'y': 10
+ },
+ {
+ 'x': 1415827200000,
+ 'y': 2
+ },
+ {
+ 'x': 1415827230000,
+ 'y': 8
+ },
+ {
+ 'x': 1415827260000,
+ 'y': 5
+ },
+ {
+ 'x': 1415827290000,
+ 'y': 6
+ },
+ {
+ 'x': 1415827320000,
+ 'y': 6
+ },
+ {
+ 'x': 1415827350000,
+ 'y': 10
+ },
+ {
+ 'x': 1415827380000,
+ 'y': 6
+ },
+ {
+ 'x': 1415827410000,
+ 'y': 6
+ },
+ {
+ 'x': 1415827440000,
+ 'y': 12
+ },
+ {
+ 'x': 1415827470000,
+ 'y': 9
+ },
+ {
+ 'x': 1415827500000,
+ 'y': 1
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'label': '503: response',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'interval': 30000,
+ 'min': 1415826608440,
+ 'max': 1415827508440
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ },
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 1415826630000,
+ 'y': 1
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 1
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 1
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 1
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 1
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 1
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 1
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 2
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'label': '404: response',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'interval': 30000,
+ 'min': 1415826608440,
+ 'max': 1415827508440
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ },
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 1415826660000,
+ 'y': 1
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 1
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 1
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 1
+ },
+ {
+ 'x': 1415827260000,
+ 'y': 1
+ },
+ {
+ 'x': 1415827380000,
+ 'y': 1
+ },
+ {
+ 'x': 1415827410000,
+ 'y': 1
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ 'hits': 225
+};
diff --git a/bin/fixtures/vislib/mock_data/date_histogram/_rows.js b/bin/fixtures/vislib/mock_data/date_histogram/_rows.js
new file mode 100644
index 00000000000000..c2ff7a40de5f5f
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/date_histogram/_rows.js
@@ -0,0 +1,1645 @@
+var moment = require('moment');
+
+module.exports = {
+ 'rows': [
+ {
+ 'label': '0.0-1000.0: bytes',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'interval': 30000,
+ 'min': 1415826260456,
+ 'max': 1415827160456
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ },
+ 'series': [
+ {
+ 'label': 'jpg',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'css',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'png',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 1,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'php',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 0,
+ 'y0': 2
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'gif',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 3,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 1,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 1,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 1,
+ 'y0': 2
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'label': '1000.0-2000.0: bytes',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'interval': 30000,
+ 'min': 1415826260457,
+ 'max': 1415827160457
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ },
+ 'series': [
+ {
+ 'label': 'jpg',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 2,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'css',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 2
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'png',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 2
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'php',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 2
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'gif',
+ 'values': [
+ {
+ 'x': 1415826240000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826270000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826300000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826330000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826360000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826390000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826420000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826450000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826480000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826510000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826540000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826570000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826600000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826630000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826660000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826690000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826720000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826750000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826780000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826810000,
+ 'y': 0,
+ 'y0': 2
+ },
+ {
+ 'x': 1415826840000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826870000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826900000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415826930000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826960000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415826990000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827020000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827050000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827080000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 1415827110000,
+ 'y': 0,
+ 'y0': 1
+ },
+ {
+ 'x': 1415827140000,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ 'hits': 236
+};
diff --git a/bin/fixtures/vislib/mock_data/date_histogram/_series.js b/bin/fixtures/vislib/mock_data/date_histogram/_series.js
new file mode 100644
index 00000000000000..7c126c41eb9d3b
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/date_histogram/_series.js
@@ -0,0 +1,150 @@
+var moment = require('moment');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'min': 1411761457636,
+ 'max': 1411762357636,
+ 'interval': 30000
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 1411761450000,
+ 'y': 41
+ },
+ {
+ 'x': 1411761480000,
+ 'y': 18
+ },
+ {
+ 'x': 1411761510000,
+ 'y': 22
+ },
+ {
+ 'x': 1411761540000,
+ 'y': 17
+ },
+ {
+ 'x': 1411761570000,
+ 'y': 17
+ },
+ {
+ 'x': 1411761600000,
+ 'y': 21
+ },
+ {
+ 'x': 1411761630000,
+ 'y': 16
+ },
+ {
+ 'x': 1411761660000,
+ 'y': 17
+ },
+ {
+ 'x': 1411761690000,
+ 'y': 15
+ },
+ {
+ 'x': 1411761720000,
+ 'y': 19
+ },
+ {
+ 'x': 1411761750000,
+ 'y': 11
+ },
+ {
+ 'x': 1411761780000,
+ 'y': 13
+ },
+ {
+ 'x': 1411761810000,
+ 'y': 24
+ },
+ {
+ 'x': 1411761840000,
+ 'y': 20
+ },
+ {
+ 'x': 1411761870000,
+ 'y': 20
+ },
+ {
+ 'x': 1411761900000,
+ 'y': 21
+ },
+ {
+ 'x': 1411761930000,
+ 'y': 17
+ },
+ {
+ 'x': 1411761960000,
+ 'y': 20
+ },
+ {
+ 'x': 1411761990000,
+ 'y': 13
+ },
+ {
+ 'x': 1411762020000,
+ 'y': 14
+ },
+ {
+ 'x': 1411762050000,
+ 'y': 25
+ },
+ {
+ 'x': 1411762080000,
+ 'y': 17
+ },
+ {
+ 'x': 1411762110000,
+ 'y': 14
+ },
+ {
+ 'x': 1411762140000,
+ 'y': 22
+ },
+ {
+ 'x': 1411762170000,
+ 'y': 14
+ },
+ {
+ 'x': 1411762200000,
+ 'y': 19
+ },
+ {
+ 'x': 1411762230000,
+ 'y': 22
+ },
+ {
+ 'x': 1411762260000,
+ 'y': 17
+ },
+ {
+ 'x': 1411762290000,
+ 'y': 8
+ },
+ {
+ 'x': 1411762320000,
+ 'y': 15
+ },
+ {
+ 'x': 1411762350000,
+ 'y': 4
+ }
+ ]
+ }
+ ],
+ 'hits': 533,
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/date_histogram/_series_neg.js b/bin/fixtures/vislib/mock_data/date_histogram/_series_neg.js
new file mode 100644
index 00000000000000..a514c0000efcf3
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/date_histogram/_series_neg.js
@@ -0,0 +1,150 @@
+var moment = require('moment');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'min': 1411761457636,
+ 'max': 1411762357636,
+ 'interval': 30000
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 1411761450000,
+ 'y': -41
+ },
+ {
+ 'x': 1411761480000,
+ 'y': -18
+ },
+ {
+ 'x': 1411761510000,
+ 'y': -22
+ },
+ {
+ 'x': 1411761540000,
+ 'y': -17
+ },
+ {
+ 'x': 1411761570000,
+ 'y': -17
+ },
+ {
+ 'x': 1411761600000,
+ 'y': -21
+ },
+ {
+ 'x': 1411761630000,
+ 'y': -16
+ },
+ {
+ 'x': 1411761660000,
+ 'y': -17
+ },
+ {
+ 'x': 1411761690000,
+ 'y': -15
+ },
+ {
+ 'x': 1411761720000,
+ 'y': -19
+ },
+ {
+ 'x': 1411761750000,
+ 'y': -11
+ },
+ {
+ 'x': 1411761780000,
+ 'y': -13
+ },
+ {
+ 'x': 1411761810000,
+ 'y': -24
+ },
+ {
+ 'x': 1411761840000,
+ 'y': -20
+ },
+ {
+ 'x': 1411761870000,
+ 'y': -20
+ },
+ {
+ 'x': 1411761900000,
+ 'y': -21
+ },
+ {
+ 'x': 1411761930000,
+ 'y': -17
+ },
+ {
+ 'x': 1411761960000,
+ 'y': -20
+ },
+ {
+ 'x': 1411761990000,
+ 'y': -13
+ },
+ {
+ 'x': 1411762020000,
+ 'y': -14
+ },
+ {
+ 'x': 1411762050000,
+ 'y': -25
+ },
+ {
+ 'x': 1411762080000,
+ 'y': -17
+ },
+ {
+ 'x': 1411762110000,
+ 'y': -14
+ },
+ {
+ 'x': 1411762140000,
+ 'y': -22
+ },
+ {
+ 'x': 1411762170000,
+ 'y': -14
+ },
+ {
+ 'x': 1411762200000,
+ 'y': -19
+ },
+ {
+ 'x': 1411762230000,
+ 'y': -22
+ },
+ {
+ 'x': 1411762260000,
+ 'y': -17
+ },
+ {
+ 'x': 1411762290000,
+ 'y': -8
+ },
+ {
+ 'x': 1411762320000,
+ 'y': -15
+ },
+ {
+ 'x': 1411762350000,
+ 'y': -4
+ }
+ ]
+ }
+ ],
+ 'hits': 533,
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/date_histogram/_series_pos_neg.js b/bin/fixtures/vislib/mock_data/date_histogram/_series_pos_neg.js
new file mode 100644
index 00000000000000..f7345c1e10c8ab
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/date_histogram/_series_pos_neg.js
@@ -0,0 +1,150 @@
+var moment = require('moment');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'min': 1411761457636,
+ 'max': 1411762357636,
+ 'interval': 30000
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 1411761450000,
+ 'y': 41
+ },
+ {
+ 'x': 1411761480000,
+ 'y': 18
+ },
+ {
+ 'x': 1411761510000,
+ 'y': -22
+ },
+ {
+ 'x': 1411761540000,
+ 'y': -17
+ },
+ {
+ 'x': 1411761570000,
+ 'y': -17
+ },
+ {
+ 'x': 1411761600000,
+ 'y': -21
+ },
+ {
+ 'x': 1411761630000,
+ 'y': -16
+ },
+ {
+ 'x': 1411761660000,
+ 'y': 17
+ },
+ {
+ 'x': 1411761690000,
+ 'y': 15
+ },
+ {
+ 'x': 1411761720000,
+ 'y': 19
+ },
+ {
+ 'x': 1411761750000,
+ 'y': 11
+ },
+ {
+ 'x': 1411761780000,
+ 'y': -13
+ },
+ {
+ 'x': 1411761810000,
+ 'y': -24
+ },
+ {
+ 'x': 1411761840000,
+ 'y': -20
+ },
+ {
+ 'x': 1411761870000,
+ 'y': -20
+ },
+ {
+ 'x': 1411761900000,
+ 'y': -21
+ },
+ {
+ 'x': 1411761930000,
+ 'y': 17
+ },
+ {
+ 'x': 1411761960000,
+ 'y': 20
+ },
+ {
+ 'x': 1411761990000,
+ 'y': -13
+ },
+ {
+ 'x': 1411762020000,
+ 'y': -14
+ },
+ {
+ 'x': 1411762050000,
+ 'y': 25
+ },
+ {
+ 'x': 1411762080000,
+ 'y': -17
+ },
+ {
+ 'x': 1411762110000,
+ 'y': -14
+ },
+ {
+ 'x': 1411762140000,
+ 'y': -22
+ },
+ {
+ 'x': 1411762170000,
+ 'y': -14
+ },
+ {
+ 'x': 1411762200000,
+ 'y': 19
+ },
+ {
+ 'x': 1411762230000,
+ 'y': 22
+ },
+ {
+ 'x': 1411762260000,
+ 'y': 17
+ },
+ {
+ 'x': 1411762290000,
+ 'y': 8
+ },
+ {
+ 'x': 1411762320000,
+ 'y': -15
+ },
+ {
+ 'x': 1411762350000,
+ 'y': -4
+ }
+ ]
+ }
+ ],
+ 'hits': 533,
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/date_histogram/_stacked_series.js b/bin/fixtures/vislib/mock_data/date_histogram/_stacked_series.js
new file mode 100644
index 00000000000000..e124703fda6901
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/date_histogram/_stacked_series.js
@@ -0,0 +1,1483 @@
+var moment = require('moment');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': '@timestamp per 10 min',
+ 'ordered': {
+ 'date': true,
+ 'min': 1413544140087,
+ 'max': 1413587340087,
+ 'interval': 600000
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'label': 'html',
+ 'values': [
+ {
+ 'x': 1413543600000,
+ 'y': 140
+ },
+ {
+ 'x': 1413544200000,
+ 'y': 1388
+ },
+ {
+ 'x': 1413544800000,
+ 'y': 1308
+ },
+ {
+ 'x': 1413545400000,
+ 'y': 1356
+ },
+ {
+ 'x': 1413546000000,
+ 'y': 1314
+ },
+ {
+ 'x': 1413546600000,
+ 'y': 1343
+ },
+ {
+ 'x': 1413547200000,
+ 'y': 1353
+ },
+ {
+ 'x': 1413547800000,
+ 'y': 1353
+ },
+ {
+ 'x': 1413548400000,
+ 'y': 1334
+ },
+ {
+ 'x': 1413549000000,
+ 'y': 1433
+ },
+ {
+ 'x': 1413549600000,
+ 'y': 1331
+ },
+ {
+ 'x': 1413550200000,
+ 'y': 1349
+ },
+ {
+ 'x': 1413550800000,
+ 'y': 1323
+ },
+ {
+ 'x': 1413551400000,
+ 'y': 1203
+ },
+ {
+ 'x': 1413552000000,
+ 'y': 1231
+ },
+ {
+ 'x': 1413552600000,
+ 'y': 1227
+ },
+ {
+ 'x': 1413553200000,
+ 'y': 1187
+ },
+ {
+ 'x': 1413553800000,
+ 'y': 1119
+ },
+ {
+ 'x': 1413554400000,
+ 'y': 1159
+ },
+ {
+ 'x': 1413555000000,
+ 'y': 1117
+ },
+ {
+ 'x': 1413555600000,
+ 'y': 1152
+ },
+ {
+ 'x': 1413556200000,
+ 'y': 1057
+ },
+ {
+ 'x': 1413556800000,
+ 'y': 1009
+ },
+ {
+ 'x': 1413557400000,
+ 'y': 979
+ },
+ {
+ 'x': 1413558000000,
+ 'y': 975
+ },
+ {
+ 'x': 1413558600000,
+ 'y': 848
+ },
+ {
+ 'x': 1413559200000,
+ 'y': 873
+ },
+ {
+ 'x': 1413559800000,
+ 'y': 808
+ },
+ {
+ 'x': 1413560400000,
+ 'y': 784
+ },
+ {
+ 'x': 1413561000000,
+ 'y': 799
+ },
+ {
+ 'x': 1413561600000,
+ 'y': 684
+ },
+ {
+ 'x': 1413562200000,
+ 'y': 727
+ },
+ {
+ 'x': 1413562800000,
+ 'y': 621
+ },
+ {
+ 'x': 1413563400000,
+ 'y': 615
+ },
+ {
+ 'x': 1413564000000,
+ 'y': 569
+ },
+ {
+ 'x': 1413564600000,
+ 'y': 523
+ },
+ {
+ 'x': 1413565200000,
+ 'y': 474
+ },
+ {
+ 'x': 1413565800000,
+ 'y': 470
+ },
+ {
+ 'x': 1413566400000,
+ 'y': 466
+ },
+ {
+ 'x': 1413567000000,
+ 'y': 394
+ },
+ {
+ 'x': 1413567600000,
+ 'y': 404
+ },
+ {
+ 'x': 1413568200000,
+ 'y': 389
+ },
+ {
+ 'x': 1413568800000,
+ 'y': 312
+ },
+ {
+ 'x': 1413569400000,
+ 'y': 274
+ },
+ {
+ 'x': 1413570000000,
+ 'y': 285
+ },
+ {
+ 'x': 1413570600000,
+ 'y': 299
+ },
+ {
+ 'x': 1413571200000,
+ 'y': 207
+ },
+ {
+ 'x': 1413571800000,
+ 'y': 213
+ },
+ {
+ 'x': 1413572400000,
+ 'y': 119
+ },
+ {
+ 'x': 1413573600000,
+ 'y': 122
+ },
+ {
+ 'x': 1413574200000,
+ 'y': 169
+ },
+ {
+ 'x': 1413574800000,
+ 'y': 151
+ },
+ {
+ 'x': 1413575400000,
+ 'y': 152
+ },
+ {
+ 'x': 1413576000000,
+ 'y': 115
+ },
+ {
+ 'x': 1413576600000,
+ 'y': 117
+ },
+ {
+ 'x': 1413577200000,
+ 'y': 108
+ },
+ {
+ 'x': 1413577800000,
+ 'y': 100
+ },
+ {
+ 'x': 1413578400000,
+ 'y': 78
+ },
+ {
+ 'x': 1413579000000,
+ 'y': 88
+ },
+ {
+ 'x': 1413579600000,
+ 'y': 63
+ },
+ {
+ 'x': 1413580200000,
+ 'y': 58
+ },
+ {
+ 'x': 1413580800000,
+ 'y': 45
+ },
+ {
+ 'x': 1413581400000,
+ 'y': 57
+ },
+ {
+ 'x': 1413582000000,
+ 'y': 34
+ },
+ {
+ 'x': 1413582600000,
+ 'y': 41
+ },
+ {
+ 'x': 1413583200000,
+ 'y': 24
+ },
+ {
+ 'x': 1413583800000,
+ 'y': 27
+ },
+ {
+ 'x': 1413584400000,
+ 'y': 19
+ },
+ {
+ 'x': 1413585000000,
+ 'y': 24
+ },
+ {
+ 'x': 1413585600000,
+ 'y': 18
+ },
+ {
+ 'x': 1413586200000,
+ 'y': 17
+ },
+ {
+ 'x': 1413586800000,
+ 'y': 14
+ }
+ ]
+ },
+ {
+ 'label': 'php',
+ 'values': [
+ {
+ 'x': 1413543600000,
+ 'y': 90
+ },
+ {
+ 'x': 1413544200000,
+ 'y': 949
+ },
+ {
+ 'x': 1413544800000,
+ 'y': 1012
+ },
+ {
+ 'x': 1413545400000,
+ 'y': 1027
+ },
+ {
+ 'x': 1413546000000,
+ 'y': 1073
+ },
+ {
+ 'x': 1413546600000,
+ 'y': 992
+ },
+ {
+ 'x': 1413547200000,
+ 'y': 1005
+ },
+ {
+ 'x': 1413547800000,
+ 'y': 1014
+ },
+ {
+ 'x': 1413548400000,
+ 'y': 987
+ },
+ {
+ 'x': 1413549000000,
+ 'y': 982
+ },
+ {
+ 'x': 1413549600000,
+ 'y': 1086
+ },
+ {
+ 'x': 1413550200000,
+ 'y': 998
+ },
+ {
+ 'x': 1413550800000,
+ 'y': 935
+ },
+ {
+ 'x': 1413551400000,
+ 'y': 995
+ },
+ {
+ 'x': 1413552000000,
+ 'y': 926
+ },
+ {
+ 'x': 1413552600000,
+ 'y': 897
+ },
+ {
+ 'x': 1413553200000,
+ 'y': 873
+ },
+ {
+ 'x': 1413553800000,
+ 'y': 885
+ },
+ {
+ 'x': 1413554400000,
+ 'y': 859
+ },
+ {
+ 'x': 1413555000000,
+ 'y': 852
+ },
+ {
+ 'x': 1413555600000,
+ 'y': 779
+ },
+ {
+ 'x': 1413556200000,
+ 'y': 739
+ },
+ {
+ 'x': 1413556800000,
+ 'y': 783
+ },
+ {
+ 'x': 1413557400000,
+ 'y': 784
+ },
+ {
+ 'x': 1413558000000,
+ 'y': 687
+ },
+ {
+ 'x': 1413558600000,
+ 'y': 660
+ },
+ {
+ 'x': 1413559200000,
+ 'y': 672
+ },
+ {
+ 'x': 1413559800000,
+ 'y': 600
+ },
+ {
+ 'x': 1413560400000,
+ 'y': 659
+ },
+ {
+ 'x': 1413561000000,
+ 'y': 540
+ },
+ {
+ 'x': 1413561600000,
+ 'y': 539
+ },
+ {
+ 'x': 1413562200000,
+ 'y': 481
+ },
+ {
+ 'x': 1413562800000,
+ 'y': 498
+ },
+ {
+ 'x': 1413563400000,
+ 'y': 444
+ },
+ {
+ 'x': 1413564000000,
+ 'y': 452
+ },
+ {
+ 'x': 1413564600000,
+ 'y': 408
+ },
+ {
+ 'x': 1413565200000,
+ 'y': 358
+ },
+ {
+ 'x': 1413565800000,
+ 'y': 321
+ },
+ {
+ 'x': 1413566400000,
+ 'y': 305
+ },
+ {
+ 'x': 1413567000000,
+ 'y': 292
+ },
+ {
+ 'x': 1413567600000,
+ 'y': 289
+ },
+ {
+ 'x': 1413568200000,
+ 'y': 239
+ },
+ {
+ 'x': 1413568800000,
+ 'y': 256
+ },
+ {
+ 'x': 1413569400000,
+ 'y': 220
+ },
+ {
+ 'x': 1413570000000,
+ 'y': 205
+ },
+ {
+ 'x': 1413570600000,
+ 'y': 201
+ },
+ {
+ 'x': 1413571200000,
+ 'y': 183
+ },
+ {
+ 'x': 1413571800000,
+ 'y': 172
+ },
+ {
+ 'x': 1413572400000,
+ 'y': 73
+ },
+ {
+ 'x': 1413573600000,
+ 'y': 90
+ },
+ {
+ 'x': 1413574200000,
+ 'y': 130
+ },
+ {
+ 'x': 1413574800000,
+ 'y': 104
+ },
+ {
+ 'x': 1413575400000,
+ 'y': 108
+ },
+ {
+ 'x': 1413576000000,
+ 'y': 92
+ },
+ {
+ 'x': 1413576600000,
+ 'y': 79
+ },
+ {
+ 'x': 1413577200000,
+ 'y': 90
+ },
+ {
+ 'x': 1413577800000,
+ 'y': 72
+ },
+ {
+ 'x': 1413578400000,
+ 'y': 68
+ },
+ {
+ 'x': 1413579000000,
+ 'y': 52
+ },
+ {
+ 'x': 1413579600000,
+ 'y': 60
+ },
+ {
+ 'x': 1413580200000,
+ 'y': 51
+ },
+ {
+ 'x': 1413580800000,
+ 'y': 32
+ },
+ {
+ 'x': 1413581400000,
+ 'y': 37
+ },
+ {
+ 'x': 1413582000000,
+ 'y': 30
+ },
+ {
+ 'x': 1413582600000,
+ 'y': 29
+ },
+ {
+ 'x': 1413583200000,
+ 'y': 24
+ },
+ {
+ 'x': 1413583800000,
+ 'y': 16
+ },
+ {
+ 'x': 1413584400000,
+ 'y': 15
+ },
+ {
+ 'x': 1413585000000,
+ 'y': 15
+ },
+ {
+ 'x': 1413585600000,
+ 'y': 10
+ },
+ {
+ 'x': 1413586200000,
+ 'y': 9
+ },
+ {
+ 'x': 1413586800000,
+ 'y': 9
+ }
+ ]
+ },
+ {
+ 'label': 'png',
+ 'values': [
+ {
+ 'x': 1413543600000,
+ 'y': 44
+ },
+ {
+ 'x': 1413544200000,
+ 'y': 495
+ },
+ {
+ 'x': 1413544800000,
+ 'y': 489
+ },
+ {
+ 'x': 1413545400000,
+ 'y': 492
+ },
+ {
+ 'x': 1413546000000,
+ 'y': 556
+ },
+ {
+ 'x': 1413546600000,
+ 'y': 536
+ },
+ {
+ 'x': 1413547200000,
+ 'y': 511
+ },
+ {
+ 'x': 1413547800000,
+ 'y': 479
+ },
+ {
+ 'x': 1413548400000,
+ 'y': 544
+ },
+ {
+ 'x': 1413549000000,
+ 'y': 513
+ },
+ {
+ 'x': 1413549600000,
+ 'y': 501
+ },
+ {
+ 'x': 1413550200000,
+ 'y': 532
+ },
+ {
+ 'x': 1413550800000,
+ 'y': 440
+ },
+ {
+ 'x': 1413551400000,
+ 'y': 455
+ },
+ {
+ 'x': 1413552000000,
+ 'y': 455
+ },
+ {
+ 'x': 1413552600000,
+ 'y': 471
+ },
+ {
+ 'x': 1413553200000,
+ 'y': 428
+ },
+ {
+ 'x': 1413553800000,
+ 'y': 457
+ },
+ {
+ 'x': 1413554400000,
+ 'y': 450
+ },
+ {
+ 'x': 1413555000000,
+ 'y': 418
+ },
+ {
+ 'x': 1413555600000,
+ 'y': 398
+ },
+ {
+ 'x': 1413556200000,
+ 'y': 397
+ },
+ {
+ 'x': 1413556800000,
+ 'y': 359
+ },
+ {
+ 'x': 1413557400000,
+ 'y': 398
+ },
+ {
+ 'x': 1413558000000,
+ 'y': 339
+ },
+ {
+ 'x': 1413558600000,
+ 'y': 363
+ },
+ {
+ 'x': 1413559200000,
+ 'y': 297
+ },
+ {
+ 'x': 1413559800000,
+ 'y': 323
+ },
+ {
+ 'x': 1413560400000,
+ 'y': 302
+ },
+ {
+ 'x': 1413561000000,
+ 'y': 260
+ },
+ {
+ 'x': 1413561600000,
+ 'y': 276
+ },
+ {
+ 'x': 1413562200000,
+ 'y': 249
+ },
+ {
+ 'x': 1413562800000,
+ 'y': 248
+ },
+ {
+ 'x': 1413563400000,
+ 'y': 235
+ },
+ {
+ 'x': 1413564000000,
+ 'y': 234
+ },
+ {
+ 'x': 1413564600000,
+ 'y': 188
+ },
+ {
+ 'x': 1413565200000,
+ 'y': 192
+ },
+ {
+ 'x': 1413565800000,
+ 'y': 173
+ },
+ {
+ 'x': 1413566400000,
+ 'y': 160
+ },
+ {
+ 'x': 1413567000000,
+ 'y': 137
+ },
+ {
+ 'x': 1413567600000,
+ 'y': 158
+ },
+ {
+ 'x': 1413568200000,
+ 'y': 111
+ },
+ {
+ 'x': 1413568800000,
+ 'y': 145
+ },
+ {
+ 'x': 1413569400000,
+ 'y': 118
+ },
+ {
+ 'x': 1413570000000,
+ 'y': 104
+ },
+ {
+ 'x': 1413570600000,
+ 'y': 80
+ },
+ {
+ 'x': 1413571200000,
+ 'y': 79
+ },
+ {
+ 'x': 1413571800000,
+ 'y': 86
+ },
+ {
+ 'x': 1413572400000,
+ 'y': 47
+ },
+ {
+ 'x': 1413573600000,
+ 'y': 49
+ },
+ {
+ 'x': 1413574200000,
+ 'y': 68
+ },
+ {
+ 'x': 1413574800000,
+ 'y': 78
+ },
+ {
+ 'x': 1413575400000,
+ 'y': 77
+ },
+ {
+ 'x': 1413576000000,
+ 'y': 50
+ },
+ {
+ 'x': 1413576600000,
+ 'y': 51
+ },
+ {
+ 'x': 1413577200000,
+ 'y': 40
+ },
+ {
+ 'x': 1413577800000,
+ 'y': 42
+ },
+ {
+ 'x': 1413578400000,
+ 'y': 29
+ },
+ {
+ 'x': 1413579000000,
+ 'y': 24
+ },
+ {
+ 'x': 1413579600000,
+ 'y': 30
+ },
+ {
+ 'x': 1413580200000,
+ 'y': 18
+ },
+ {
+ 'x': 1413580800000,
+ 'y': 15
+ },
+ {
+ 'x': 1413581400000,
+ 'y': 19
+ },
+ {
+ 'x': 1413582000000,
+ 'y': 18
+ },
+ {
+ 'x': 1413582600000,
+ 'y': 13
+ },
+ {
+ 'x': 1413583200000,
+ 'y': 11
+ },
+ {
+ 'x': 1413583800000,
+ 'y': 11
+ },
+ {
+ 'x': 1413584400000,
+ 'y': 13
+ },
+ {
+ 'x': 1413585000000,
+ 'y': 9
+ },
+ {
+ 'x': 1413585600000,
+ 'y': 9
+ },
+ {
+ 'x': 1413586200000,
+ 'y': 9
+ },
+ {
+ 'x': 1413586800000,
+ 'y': 3
+ }
+ ]
+ },
+ {
+ 'label': 'css',
+ 'values': [
+ {
+ 'x': 1413543600000,
+ 'y': 35
+ },
+ {
+ 'x': 1413544200000,
+ 'y': 360
+ },
+ {
+ 'x': 1413544800000,
+ 'y': 343
+ },
+ {
+ 'x': 1413545400000,
+ 'y': 329
+ },
+ {
+ 'x': 1413546000000,
+ 'y': 345
+ },
+ {
+ 'x': 1413546600000,
+ 'y': 336
+ },
+ {
+ 'x': 1413547200000,
+ 'y': 330
+ },
+ {
+ 'x': 1413547800000,
+ 'y': 334
+ },
+ {
+ 'x': 1413548400000,
+ 'y': 326
+ },
+ {
+ 'x': 1413549000000,
+ 'y': 351
+ },
+ {
+ 'x': 1413549600000,
+ 'y': 334
+ },
+ {
+ 'x': 1413550200000,
+ 'y': 351
+ },
+ {
+ 'x': 1413550800000,
+ 'y': 337
+ },
+ {
+ 'x': 1413551400000,
+ 'y': 306
+ },
+ {
+ 'x': 1413552000000,
+ 'y': 346
+ },
+ {
+ 'x': 1413552600000,
+ 'y': 317
+ },
+ {
+ 'x': 1413553200000,
+ 'y': 298
+ },
+ {
+ 'x': 1413553800000,
+ 'y': 288
+ },
+ {
+ 'x': 1413554400000,
+ 'y': 283
+ },
+ {
+ 'x': 1413555000000,
+ 'y': 262
+ },
+ {
+ 'x': 1413555600000,
+ 'y': 245
+ },
+ {
+ 'x': 1413556200000,
+ 'y': 259
+ },
+ {
+ 'x': 1413556800000,
+ 'y': 267
+ },
+ {
+ 'x': 1413557400000,
+ 'y': 230
+ },
+ {
+ 'x': 1413558000000,
+ 'y': 218
+ },
+ {
+ 'x': 1413558600000,
+ 'y': 241
+ },
+ {
+ 'x': 1413559200000,
+ 'y': 213
+ },
+ {
+ 'x': 1413559800000,
+ 'y': 239
+ },
+ {
+ 'x': 1413560400000,
+ 'y': 208
+ },
+ {
+ 'x': 1413561000000,
+ 'y': 187
+ },
+ {
+ 'x': 1413561600000,
+ 'y': 166
+ },
+ {
+ 'x': 1413562200000,
+ 'y': 154
+ },
+ {
+ 'x': 1413562800000,
+ 'y': 184
+ },
+ {
+ 'x': 1413563400000,
+ 'y': 148
+ },
+ {
+ 'x': 1413564000000,
+ 'y': 153
+ },
+ {
+ 'x': 1413564600000,
+ 'y': 149
+ },
+ {
+ 'x': 1413565200000,
+ 'y': 102
+ },
+ {
+ 'x': 1413565800000,
+ 'y': 110
+ },
+ {
+ 'x': 1413566400000,
+ 'y': 121
+ },
+ {
+ 'x': 1413567000000,
+ 'y': 120
+ },
+ {
+ 'x': 1413567600000,
+ 'y': 86
+ },
+ {
+ 'x': 1413568200000,
+ 'y': 96
+ },
+ {
+ 'x': 1413568800000,
+ 'y': 71
+ },
+ {
+ 'x': 1413569400000,
+ 'y': 92
+ },
+ {
+ 'x': 1413570000000,
+ 'y': 65
+ },
+ {
+ 'x': 1413570600000,
+ 'y': 54
+ },
+ {
+ 'x': 1413571200000,
+ 'y': 68
+ },
+ {
+ 'x': 1413571800000,
+ 'y': 57
+ },
+ {
+ 'x': 1413572400000,
+ 'y': 33
+ },
+ {
+ 'x': 1413573600000,
+ 'y': 47
+ },
+ {
+ 'x': 1413574200000,
+ 'y': 42
+ },
+ {
+ 'x': 1413574800000,
+ 'y': 39
+ },
+ {
+ 'x': 1413575400000,
+ 'y': 25
+ },
+ {
+ 'x': 1413576000000,
+ 'y': 31
+ },
+ {
+ 'x': 1413576600000,
+ 'y': 37
+ },
+ {
+ 'x': 1413577200000,
+ 'y': 35
+ },
+ {
+ 'x': 1413577800000,
+ 'y': 19
+ },
+ {
+ 'x': 1413578400000,
+ 'y': 15
+ },
+ {
+ 'x': 1413579000000,
+ 'y': 21
+ },
+ {
+ 'x': 1413579600000,
+ 'y': 16
+ },
+ {
+ 'x': 1413580200000,
+ 'y': 18
+ },
+ {
+ 'x': 1413580800000,
+ 'y': 10
+ },
+ {
+ 'x': 1413581400000,
+ 'y': 13
+ },
+ {
+ 'x': 1413582000000,
+ 'y': 14
+ },
+ {
+ 'x': 1413582600000,
+ 'y': 11
+ },
+ {
+ 'x': 1413583200000,
+ 'y': 4
+ },
+ {
+ 'x': 1413583800000,
+ 'y': 6
+ },
+ {
+ 'x': 1413584400000,
+ 'y': 3
+ },
+ {
+ 'x': 1413585000000,
+ 'y': 6
+ },
+ {
+ 'x': 1413585600000,
+ 'y': 6
+ },
+ {
+ 'x': 1413586200000,
+ 'y': 2
+ },
+ {
+ 'x': 1413586800000,
+ 'y': 3
+ }
+ ]
+ },
+ {
+ 'label': 'gif',
+ 'values': [
+ {
+ 'x': 1413543600000,
+ 'y': 21
+ },
+ {
+ 'x': 1413544200000,
+ 'y': 191
+ },
+ {
+ 'x': 1413544800000,
+ 'y': 176
+ },
+ {
+ 'x': 1413545400000,
+ 'y': 166
+ },
+ {
+ 'x': 1413546000000,
+ 'y': 183
+ },
+ {
+ 'x': 1413546600000,
+ 'y': 170
+ },
+ {
+ 'x': 1413547200000,
+ 'y': 153
+ },
+ {
+ 'x': 1413547800000,
+ 'y': 202
+ },
+ {
+ 'x': 1413548400000,
+ 'y': 175
+ },
+ {
+ 'x': 1413549000000,
+ 'y': 161
+ },
+ {
+ 'x': 1413549600000,
+ 'y': 174
+ },
+ {
+ 'x': 1413550200000,
+ 'y': 167
+ },
+ {
+ 'x': 1413550800000,
+ 'y': 171
+ },
+ {
+ 'x': 1413551400000,
+ 'y': 176
+ },
+ {
+ 'x': 1413552000000,
+ 'y': 139
+ },
+ {
+ 'x': 1413552600000,
+ 'y': 145
+ },
+ {
+ 'x': 1413553200000,
+ 'y': 157
+ },
+ {
+ 'x': 1413553800000,
+ 'y': 148
+ },
+ {
+ 'x': 1413554400000,
+ 'y': 149
+ },
+ {
+ 'x': 1413555000000,
+ 'y': 135
+ },
+ {
+ 'x': 1413555600000,
+ 'y': 118
+ },
+ {
+ 'x': 1413556200000,
+ 'y': 142
+ },
+ {
+ 'x': 1413556800000,
+ 'y': 141
+ },
+ {
+ 'x': 1413557400000,
+ 'y': 146
+ },
+ {
+ 'x': 1413558000000,
+ 'y': 114
+ },
+ {
+ 'x': 1413558600000,
+ 'y': 115
+ },
+ {
+ 'x': 1413559200000,
+ 'y': 136
+ },
+ {
+ 'x': 1413559800000,
+ 'y': 106
+ },
+ {
+ 'x': 1413560400000,
+ 'y': 92
+ },
+ {
+ 'x': 1413561000000,
+ 'y': 97
+ },
+ {
+ 'x': 1413561600000,
+ 'y': 90
+ },
+ {
+ 'x': 1413562200000,
+ 'y': 69
+ },
+ {
+ 'x': 1413562800000,
+ 'y': 66
+ },
+ {
+ 'x': 1413563400000,
+ 'y': 93
+ },
+ {
+ 'x': 1413564000000,
+ 'y': 75
+ },
+ {
+ 'x': 1413564600000,
+ 'y': 68
+ },
+ {
+ 'x': 1413565200000,
+ 'y': 55
+ },
+ {
+ 'x': 1413565800000,
+ 'y': 73
+ },
+ {
+ 'x': 1413566400000,
+ 'y': 57
+ },
+ {
+ 'x': 1413567000000,
+ 'y': 48
+ },
+ {
+ 'x': 1413567600000,
+ 'y': 41
+ },
+ {
+ 'x': 1413568200000,
+ 'y': 39
+ },
+ {
+ 'x': 1413568800000,
+ 'y': 32
+ },
+ {
+ 'x': 1413569400000,
+ 'y': 33
+ },
+ {
+ 'x': 1413570000000,
+ 'y': 39
+ },
+ {
+ 'x': 1413570600000,
+ 'y': 35
+ },
+ {
+ 'x': 1413571200000,
+ 'y': 25
+ },
+ {
+ 'x': 1413571800000,
+ 'y': 28
+ },
+ {
+ 'x': 1413572400000,
+ 'y': 8
+ },
+ {
+ 'x': 1413573600000,
+ 'y': 13
+ },
+ {
+ 'x': 1413574200000,
+ 'y': 23
+ },
+ {
+ 'x': 1413574800000,
+ 'y': 19
+ },
+ {
+ 'x': 1413575400000,
+ 'y': 16
+ },
+ {
+ 'x': 1413576000000,
+ 'y': 22
+ },
+ {
+ 'x': 1413576600000,
+ 'y': 13
+ },
+ {
+ 'x': 1413577200000,
+ 'y': 21
+ },
+ {
+ 'x': 1413577800000,
+ 'y': 11
+ },
+ {
+ 'x': 1413578400000,
+ 'y': 12
+ },
+ {
+ 'x': 1413579000000,
+ 'y': 10
+ },
+ {
+ 'x': 1413579600000,
+ 'y': 7
+ },
+ {
+ 'x': 1413580200000,
+ 'y': 4
+ },
+ {
+ 'x': 1413580800000,
+ 'y': 5
+ },
+ {
+ 'x': 1413581400000,
+ 'y': 7
+ },
+ {
+ 'x': 1413582000000,
+ 'y': 9
+ },
+ {
+ 'x': 1413582600000,
+ 'y': 2
+ },
+ {
+ 'x': 1413583200000,
+ 'y': 2
+ },
+ {
+ 'x': 1413583800000,
+ 'y': 4
+ },
+ {
+ 'x': 1413584400000,
+ 'y': 6
+ },
+ {
+ 'x': 1413585600000,
+ 'y': 2
+ },
+ {
+ 'x': 1413586200000,
+ 'y': 4
+ },
+ {
+ 'x': 1413586800000,
+ 'y': 4
+ }
+ ]
+ }
+ ],
+ 'hits': 108970,
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/filters/_columns.js b/bin/fixtures/vislib/mock_data/filters/_columns.js
new file mode 100644
index 00000000000000..ea5ab1b097070d
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/filters/_columns.js
@@ -0,0 +1,106 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'columns': [
+ {
+ 'label': 'Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1: agent.raw',
+ 'xAxisLabel': 'filters',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'css',
+ 'y': 10379
+ },
+ {
+ 'x': 'png',
+ 'y': 6395
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24: agent.raw',
+ 'xAxisLabel': 'filters',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'css',
+ 'y': 9253
+ },
+ {
+ 'x': 'png',
+ 'y': 5571
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322): agent.raw',
+ 'xAxisLabel': 'filters',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'css',
+ 'y': 7740
+ },
+ {
+ 'x': 'png',
+ 'y': 4697
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 171443
+};
diff --git a/bin/fixtures/vislib/mock_data/filters/_rows.js b/bin/fixtures/vislib/mock_data/filters/_rows.js
new file mode 100644
index 00000000000000..d3c27ed491b506
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/filters/_rows.js
@@ -0,0 +1,106 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'rows': [
+ {
+ 'label': '200: response',
+ 'xAxisLabel': 'filters',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'css',
+ 'y': 25260
+ },
+ {
+ 'x': 'png',
+ 'y': 15311
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '404: response',
+ 'xAxisLabel': 'filters',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'css',
+ 'y': 1352
+ },
+ {
+ 'x': 'png',
+ 'y': 826
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '503: response',
+ 'xAxisLabel': 'filters',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'css',
+ 'y': 761
+ },
+ {
+ 'x': 'png',
+ 'y': 527
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 171443
+};
diff --git a/bin/fixtures/vislib/mock_data/filters/_series.js b/bin/fixtures/vislib/mock_data/filters/_series.js
new file mode 100644
index 00000000000000..46cdbbc3794a4a
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/filters/_series.js
@@ -0,0 +1,40 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': 'filters',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'css',
+ 'y': 27374
+ },
+ {
+ 'x': 'html',
+ 'y': 0
+ },
+ {
+ 'x': 'png',
+ 'y': 16663
+ }
+ ]
+ }
+ ],
+ 'hits': 171454,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/geohash/_columns.js b/bin/fixtures/vislib/mock_data/geohash/_columns.js
new file mode 100644
index 00000000000000..2f39a449c95514
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/geohash/_columns.js
@@ -0,0 +1,3744 @@
+var _ = require('lodash');
+module.exports = {
+ 'columns': [
+ {
+ 'title': 'Top 2 geo.dest: CN',
+ 'valueFormatter': _.identity,
+ 'geoJson': {
+ 'type': 'FeatureCollection',
+ 'features': [
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 42,
+ 'geohash': 's',
+ 'center': [
+ 22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 's',
+ 'value': 's',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 42,
+ 'value': 42,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 31,
+ 'geohash': 'd',
+ 'center': [
+ -67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'd',
+ 'value': 'd',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 31,
+ 'value': 31,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 30,
+ 'geohash': 'w',
+ 'center': [
+ 112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'w',
+ 'value': 'w',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 30,
+ 'value': 30,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 25,
+ 'geohash': '9',
+ 'center': [
+ -112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '9',
+ 'value': '9',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 25,
+ 'value': 25,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 22,
+ 'geohash': 't',
+ 'center': [
+ 67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 't',
+ 'value': 't',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 22,
+ 'value': 22,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 22,
+ 'geohash': 'k',
+ 'center': [
+ 22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'k',
+ 'value': 'k',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 22,
+ 'value': 22,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ -45
+ ],
+ [
+ 45,
+ -45
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 21,
+ 'geohash': '6',
+ 'center': [
+ -67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '6',
+ 'value': '6',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 21,
+ 'value': 21,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -45
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 19,
+ 'geohash': 'u',
+ 'center': [
+ 22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'u',
+ 'value': 'u',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 19,
+ 'value': 19,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 45,
+ 90
+ ],
+ [
+ 0,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 18,
+ 'geohash': 'v',
+ 'center': [
+ 67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'v',
+ 'value': 'v',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 18,
+ 'value': 18,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 90,
+ 90
+ ],
+ [
+ 45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 11,
+ 'geohash': 'c',
+ 'center': [
+ -112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'c',
+ 'value': 'c',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 11,
+ 'value': 11,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -90,
+ 90
+ ],
+ [
+ -135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 10,
+ 'geohash': 'r',
+ 'center': [
+ 157.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'r',
+ 'value': 'r',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 10,
+ 'value': 10,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ -45
+ ],
+ [
+ 180,
+ -45
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 9,
+ 'geohash': 'y',
+ 'center': [
+ 112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'y',
+ 'value': 'y',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 9,
+ 'value': 9,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 135,
+ 90
+ ],
+ [
+ 90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 9,
+ 'geohash': 'e',
+ 'center': [
+ -22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'e',
+ 'value': 'e',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 9,
+ 'value': 9,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 8,
+ 'geohash': 'f',
+ 'center': [
+ -67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'f',
+ 'value': 'f',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 8,
+ 'value': 8,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -45,
+ 90
+ ],
+ [
+ -90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 8,
+ 'geohash': '7',
+ 'center': [
+ -22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '7',
+ 'value': '7',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 8,
+ 'value': 8,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -45
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'q',
+ 'center': [
+ 112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'q',
+ 'value': 'q',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ -45
+ ],
+ [
+ 135,
+ -45
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'g',
+ 'center': [
+ -22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'g',
+ 'value': 'g',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ 0,
+ 90
+ ],
+ [
+ -45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 4,
+ 'geohash': 'x',
+ 'center': [
+ 157.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'x',
+ 'value': 'x',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 4,
+ 'value': 4,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 0
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 3,
+ 'geohash': 'b',
+ 'center': [
+ -157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'b',
+ 'value': 'b',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 3,
+ 'value': 3,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -180,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ],
+ [
+ -135,
+ 90
+ ],
+ [
+ -180,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 2,
+ 'geohash': 'z',
+ 'center': [
+ 157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'z',
+ 'value': 'z',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 2,
+ 'value': 2,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 45
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 180,
+ 90
+ ],
+ [
+ 135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'm',
+ 'center': [
+ 67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'm',
+ 'value': 'm',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ -45
+ ],
+ [
+ 90,
+ -45
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '5',
+ 'center': [
+ -22.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '5',
+ 'value': '5',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -90
+ ],
+ [
+ 0,
+ -90
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ -45,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '4',
+ 'center': [
+ -67.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '4',
+ 'value': '4',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -90
+ ],
+ [
+ -45,
+ -90
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -90,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '3',
+ 'center': [
+ -112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '3',
+ 'value': '3',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ -45
+ ],
+ [
+ -90,
+ -45
+ ],
+ [
+ -90,
+ 0
+ ],
+ [
+ -135,
+ 0
+ ]
+ ]
+ }
+ }
+ ],
+ 'properties': {
+ 'min': 1,
+ 'max': 42
+ }
+ }
+ },
+ {
+ 'label': 'Top 2 geo.dest: IN',
+ 'valueFormatter': _.identity,
+ 'geoJson': {
+ 'type': 'FeatureCollection',
+ 'features': [
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 32,
+ 'geohash': 's',
+ 'center': [
+ 22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 's',
+ 'value': 's',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 32,
+ 'value': 32,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 31,
+ 'geohash': '6',
+ 'center': [
+ -67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '6',
+ 'value': '6',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 31,
+ 'value': 31,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -45
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 28,
+ 'geohash': 'd',
+ 'center': [
+ -67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'd',
+ 'value': 'd',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 28,
+ 'value': 28,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 27,
+ 'geohash': 'w',
+ 'center': [
+ 112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'w',
+ 'value': 'w',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 27,
+ 'value': 27,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 24,
+ 'geohash': 't',
+ 'center': [
+ 67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 't',
+ 'value': 't',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 24,
+ 'value': 24,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 23,
+ 'geohash': 'k',
+ 'center': [
+ 22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'k',
+ 'value': 'k',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 23,
+ 'value': 23,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ -45
+ ],
+ [
+ 45,
+ -45
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 17,
+ 'geohash': 'u',
+ 'center': [
+ 22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'u',
+ 'value': 'u',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 17,
+ 'value': 17,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 45,
+ 90
+ ],
+ [
+ 0,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 16,
+ 'geohash': '9',
+ 'center': [
+ -112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '9',
+ 'value': '9',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 16,
+ 'value': 16,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 14,
+ 'geohash': 'v',
+ 'center': [
+ 67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'v',
+ 'value': 'v',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 14,
+ 'value': 14,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 90,
+ 90
+ ],
+ [
+ 45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 13,
+ 'geohash': 'e',
+ 'center': [
+ -22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'e',
+ 'value': 'e',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 13,
+ 'value': 13,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 9,
+ 'geohash': 'r',
+ 'center': [
+ 157.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'r',
+ 'value': 'r',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 9,
+ 'value': 9,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ -45
+ ],
+ [
+ 180,
+ -45
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'y',
+ 'center': [
+ 112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'y',
+ 'value': 'y',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 135,
+ 90
+ ],
+ [
+ 90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'g',
+ 'center': [
+ -22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'g',
+ 'value': 'g',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ 0,
+ 90
+ ],
+ [
+ -45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'f',
+ 'center': [
+ -67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'f',
+ 'value': 'f',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -45,
+ 90
+ ],
+ [
+ -90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 5,
+ 'geohash': 'c',
+ 'center': [
+ -112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'c',
+ 'value': 'c',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 5,
+ 'value': 5,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -90,
+ 90
+ ],
+ [
+ -135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 4,
+ 'geohash': 'b',
+ 'center': [
+ -157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'b',
+ 'value': 'b',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 4,
+ 'value': 4,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -180,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ],
+ [
+ -135,
+ 90
+ ],
+ [
+ -180,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 3,
+ 'geohash': 'q',
+ 'center': [
+ 112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'q',
+ 'value': 'q',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 3,
+ 'value': 3,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ -45
+ ],
+ [
+ 135,
+ -45
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 2,
+ 'geohash': '4',
+ 'center': [
+ -67.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '4',
+ 'value': '4',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 2,
+ 'value': 2,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -90
+ ],
+ [
+ -45,
+ -90
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -90,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'z',
+ 'center': [
+ 157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'z',
+ 'value': 'z',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 45
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 180,
+ 90
+ ],
+ [
+ 135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'x',
+ 'center': [
+ 157.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'x',
+ 'value': 'x',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 0
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'p',
+ 'center': [
+ 157.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'p',
+ 'value': 'p',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ -90
+ ],
+ [
+ 180,
+ -90
+ ],
+ [
+ 180,
+ -45
+ ],
+ [
+ 135,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'm',
+ 'center': [
+ 67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'm',
+ 'value': 'm',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ -45
+ ],
+ [
+ 90,
+ -45
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '7',
+ 'center': [
+ -22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': false
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '7',
+ 'value': '7',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -45
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ]
+ ]
+ }
+ }
+ ],
+ 'properties': {
+ 'min': 1,
+ 'max': 32
+ }
+ }
+ }
+ ]
+};
diff --git a/bin/fixtures/vislib/mock_data/geohash/_geo_json.js b/bin/fixtures/vislib/mock_data/geohash/_geo_json.js
new file mode 100644
index 00000000000000..ac84284a1a78ae
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/geohash/_geo_json.js
@@ -0,0 +1,1846 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'valueFormatter': _.identity,
+ 'geoJson': {
+ 'type': 'FeatureCollection',
+ 'features': [
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 608,
+ 'geohash': 's',
+ 'center': [
+ 22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 's',
+ 'value': 's',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 608,
+ 'value': 608,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 45,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 522,
+ 'geohash': 'w',
+ 'center': [
+ 112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'w',
+ 'value': 'w',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 522,
+ 'value': 522,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 90
+ ],
+ [
+ 0,
+ 135
+ ],
+ [
+ 45,
+ 135
+ ],
+ [
+ 45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 517,
+ 'geohash': '6',
+ 'center': [
+ -67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '6',
+ 'value': '6',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 517,
+ 'value': 517,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -90
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ 0,
+ -90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 446,
+ 'geohash': 'd',
+ 'center': [
+ -67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'd',
+ 'value': 'd',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 446,
+ 'value': 446,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ -90
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ 45,
+ -45
+ ],
+ [
+ 45,
+ -90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 426,
+ 'geohash': 'u',
+ 'center': [
+ 22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'u',
+ 'value': 'u',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 426,
+ 'value': 426,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 0
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 413,
+ 'geohash': 't',
+ 'center': [
+ 67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 't',
+ 'value': 't',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 413,
+ 'value': 413,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 45
+ ],
+ [
+ 0,
+ 90
+ ],
+ [
+ 45,
+ 90
+ ],
+ [
+ 45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 362,
+ 'geohash': 'k',
+ 'center': [
+ 22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'k',
+ 'value': 'k',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 362,
+ 'value': 362,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 0
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ 0,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 352,
+ 'geohash': '9',
+ 'center': [
+ -112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '9',
+ 'value': '9',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 352,
+ 'value': 352,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ -135
+ ],
+ [
+ 0,
+ -90
+ ],
+ [
+ 45,
+ -90
+ ],
+ [
+ 45,
+ -135
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 216,
+ 'geohash': 'e',
+ 'center': [
+ -22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'e',
+ 'value': 'e',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 216,
+ 'value': 216,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ -45
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 45,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 183,
+ 'geohash': 'v',
+ 'center': [
+ 67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'v',
+ 'value': 'v',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 183,
+ 'value': 183,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 45
+ ],
+ [
+ 45,
+ 90
+ ],
+ [
+ 90,
+ 90
+ ],
+ [
+ 90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 158,
+ 'geohash': 'r',
+ 'center': [
+ 157.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'r',
+ 'value': 'r',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 158,
+ 'value': 158,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 135
+ ],
+ [
+ -45,
+ 180
+ ],
+ [
+ 0,
+ 180
+ ],
+ [
+ 0,
+ 135
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 139,
+ 'geohash': 'y',
+ 'center': [
+ 112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'y',
+ 'value': 'y',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 139,
+ 'value': 139,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 90
+ ],
+ [
+ 45,
+ 135
+ ],
+ [
+ 90,
+ 135
+ ],
+ [
+ 90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 110,
+ 'geohash': 'c',
+ 'center': [
+ -112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'c',
+ 'value': 'c',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 110,
+ 'value': 110,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ -135
+ ],
+ [
+ 45,
+ -90
+ ],
+ [
+ 90,
+ -90
+ ],
+ [
+ 90,
+ -135
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 101,
+ 'geohash': 'q',
+ 'center': [
+ 112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'q',
+ 'value': 'q',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 101,
+ 'value': 101,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 90
+ ],
+ [
+ -45,
+ 135
+ ],
+ [
+ 0,
+ 135
+ ],
+ [
+ 0,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 101,
+ 'geohash': '7',
+ 'center': [
+ -22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '7',
+ 'value': '7',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 101,
+ 'value': 101,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -45
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 92,
+ 'geohash': 'f',
+ 'center': [
+ -67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'f',
+ 'value': 'f',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 92,
+ 'value': 92,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ -90
+ ],
+ [
+ 45,
+ -45
+ ],
+ [
+ 90,
+ -45
+ ],
+ [
+ 90,
+ -90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 75,
+ 'geohash': 'b',
+ 'center': [
+ -157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'b',
+ 'value': 'b',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 75,
+ 'value': 75,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ -180
+ ],
+ [
+ 45,
+ -135
+ ],
+ [
+ 90,
+ -135
+ ],
+ [
+ 90,
+ -180
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 64,
+ 'geohash': 'g',
+ 'center': [
+ -22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'g',
+ 'value': 'g',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 64,
+ 'value': 64,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ -45
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 90,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 36,
+ 'geohash': 'z',
+ 'center': [
+ 157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'z',
+ 'value': 'z',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 36,
+ 'value': 36,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 135
+ ],
+ [
+ 45,
+ 180
+ ],
+ [
+ 90,
+ 180
+ ],
+ [
+ 90,
+ 135
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 34,
+ 'geohash': 'x',
+ 'center': [
+ 157.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'x',
+ 'value': 'x',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 34,
+ 'value': 34,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 135
+ ],
+ [
+ 0,
+ 180
+ ],
+ [
+ 45,
+ 180
+ ],
+ [
+ 45,
+ 135
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 30,
+ 'geohash': '4',
+ 'center': [
+ -67.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '4',
+ 'value': '4',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 30,
+ 'value': 30,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -90
+ ],
+ [
+ -90,
+ -45
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -45,
+ -90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 16,
+ 'geohash': 'm',
+ 'center': [
+ 67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'm',
+ 'value': 'm',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 16,
+ 'value': 16,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 45
+ ],
+ [
+ -45,
+ 90
+ ],
+ [
+ 0,
+ 90
+ ],
+ [
+ 0,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 10,
+ 'geohash': '5',
+ 'center': [
+ -22.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '5',
+ 'value': '5',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 10,
+ 'value': 10,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -45
+ ],
+ [
+ -90,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -45,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'p',
+ 'center': [
+ 157.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'p',
+ 'value': 'p',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 135
+ ],
+ [
+ -90,
+ 180
+ ],
+ [
+ -45,
+ 180
+ ],
+ [
+ -45,
+ 135
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -157.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': '2',
+ 'center': [
+ -157.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '2',
+ 'value': '2',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -180
+ ],
+ [
+ -45,
+ -135
+ ],
+ [
+ 0,
+ -135
+ ],
+ [
+ 0,
+ -180
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 4,
+ 'geohash': 'h',
+ 'center': [
+ 22.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'h',
+ 'value': 'h',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 4,
+ 'value': 4,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 0
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -45,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 2,
+ 'geohash': 'n',
+ 'center': [
+ 112.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'n',
+ 'value': 'n',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 2,
+ 'value': 2,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 90
+ ],
+ [
+ -90,
+ 135
+ ],
+ [
+ -45,
+ 135
+ ],
+ [
+ -45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 2,
+ 'geohash': 'j',
+ 'center': [
+ 67.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': 'j',
+ 'value': 'j',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 2,
+ 'value': 2,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 45
+ ],
+ [
+ -90,
+ 90
+ ],
+ [
+ -45,
+ 90
+ ],
+ [
+ -45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '3',
+ 'center': [
+ -112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '3',
+ 'value': '3',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -135
+ ],
+ [
+ -45,
+ -90
+ ],
+ [
+ 0,
+ -90
+ ],
+ [
+ 0,
+ -135
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '1',
+ 'center': [
+ -112.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ 'key': '1',
+ 'value': '1',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -135
+ ],
+ [
+ -90,
+ -90
+ ],
+ [
+ -45,
+ -90
+ ],
+ [
+ -45,
+ -135
+ ]
+ ]
+ }
+ }
+ ],
+ 'properties': {
+ 'min': 1,
+ 'max': 608,
+ 'zoom': 2,
+ 'center': [5, 15]
+ }
+ },
+};
diff --git a/bin/fixtures/vislib/mock_data/geohash/_rows.js b/bin/fixtures/vislib/mock_data/geohash/_rows.js
new file mode 100644
index 00000000000000..e0e1e6e7560c1c
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/geohash/_rows.js
@@ -0,0 +1,3667 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'rows': [
+ {
+ 'title': 'Top 2 geo.dest: CN',
+ 'valueFormatter': _.identity,
+ 'geoJson': {
+ 'type': 'FeatureCollection',
+ 'features': [
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 39,
+ 'geohash': 's',
+ 'center': [
+ 22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 's',
+ 'value': 's',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 39,
+ 'value': 39,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 31,
+ 'geohash': 'w',
+ 'center': [
+ 112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'w',
+ 'value': 'w',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 31,
+ 'value': 31,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 30,
+ 'geohash': 'd',
+ 'center': [
+ -67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'd',
+ 'value': 'd',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 30,
+ 'value': 30,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 25,
+ 'geohash': '9',
+ 'center': [
+ -112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '9',
+ 'value': '9',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 25,
+ 'value': 25,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 23,
+ 'geohash': 't',
+ 'center': [
+ 67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 't',
+ 'value': 't',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 23,
+ 'value': 23,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 23,
+ 'geohash': 'k',
+ 'center': [
+ 22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'k',
+ 'value': 'k',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 23,
+ 'value': 23,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ -45
+ ],
+ [
+ 45,
+ -45
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 22,
+ 'geohash': '6',
+ 'center': [
+ -67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '6',
+ 'value': '6',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 22,
+ 'value': 22,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -45
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 20,
+ 'geohash': 'u',
+ 'center': [
+ 22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'u',
+ 'value': 'u',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 20,
+ 'value': 20,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 45,
+ 90
+ ],
+ [
+ 0,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 18,
+ 'geohash': 'v',
+ 'center': [
+ 67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'v',
+ 'value': 'v',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 18,
+ 'value': 18,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 90,
+ 90
+ ],
+ [
+ 45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 11,
+ 'geohash': 'r',
+ 'center': [
+ 157.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'r',
+ 'value': 'r',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 11,
+ 'value': 11,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ -45
+ ],
+ [
+ 180,
+ -45
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 11,
+ 'geohash': 'e',
+ 'center': [
+ -22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'e',
+ 'value': 'e',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 11,
+ 'value': 11,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 10,
+ 'geohash': 'y',
+ 'center': [
+ 112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'y',
+ 'value': 'y',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 10,
+ 'value': 10,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 135,
+ 90
+ ],
+ [
+ 90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 10,
+ 'geohash': 'c',
+ 'center': [
+ -112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'c',
+ 'value': 'c',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 10,
+ 'value': 10,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -90,
+ 90
+ ],
+ [
+ -135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 8,
+ 'geohash': 'f',
+ 'center': [
+ -67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'f',
+ 'value': 'f',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 8,
+ 'value': 8,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -45,
+ 90
+ ],
+ [
+ -90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 8,
+ 'geohash': '7',
+ 'center': [
+ -22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '7',
+ 'value': '7',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 8,
+ 'value': 8,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -45
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'q',
+ 'center': [
+ 112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'q',
+ 'value': 'q',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ -45
+ ],
+ [
+ 135,
+ -45
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'g',
+ 'center': [
+ -22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'g',
+ 'value': 'g',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ 0,
+ 90
+ ],
+ [
+ -45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 4,
+ 'geohash': 'x',
+ 'center': [
+ 157.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'x',
+ 'value': 'x',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 4,
+ 'value': 4,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 0
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 3,
+ 'geohash': 'b',
+ 'center': [
+ -157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'b',
+ 'value': 'b',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 3,
+ 'value': 3,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -180,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ],
+ [
+ -135,
+ 90
+ ],
+ [
+ -180,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 2,
+ 'geohash': 'z',
+ 'center': [
+ 157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'z',
+ 'value': 'z',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 2,
+ 'value': 2,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 45
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 180,
+ 90
+ ],
+ [
+ 135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 2,
+ 'geohash': '4',
+ 'center': [
+ -67.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '4',
+ 'value': '4',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 2,
+ 'value': 2,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -90
+ ],
+ [
+ -45,
+ -90
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -90,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '5',
+ 'center': [
+ -22.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '5',
+ 'value': '5',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -90
+ ],
+ [
+ 0,
+ -90
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ -45,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '3',
+ 'center': [
+ -112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'CN',
+ 'value': 'CN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '3',
+ 'value': '3',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ -45
+ ],
+ [
+ -90,
+ -45
+ ],
+ [
+ -90,
+ 0
+ ],
+ [
+ -135,
+ 0
+ ]
+ ]
+ }
+ }
+ ],
+ 'properties': {
+ 'min': 1,
+ 'max': 39
+ }
+ }
+ },
+ {
+ 'label': 'Top 2 geo.dest: IN',
+ 'valueFormatter': _.identity,
+ 'geoJson': {
+ 'type': 'FeatureCollection',
+ 'features': [
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 31,
+ 'geohash': '6',
+ 'center': [
+ -67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '6',
+ 'value': '6',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 31,
+ 'value': 31,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -45
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 30,
+ 'geohash': 's',
+ 'center': [
+ 22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 's',
+ 'value': 's',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 30,
+ 'value': 30,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 29,
+ 'geohash': 'w',
+ 'center': [
+ 112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'w',
+ 'value': 'w',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 29,
+ 'value': 29,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 28,
+ 'geohash': 'd',
+ 'center': [
+ -67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'd',
+ 'value': 'd',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 28,
+ 'value': 28,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 25,
+ 'geohash': 't',
+ 'center': [
+ 67.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 't',
+ 'value': 't',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 25,
+ 'value': 25,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 24,
+ 'geohash': 'k',
+ 'center': [
+ 22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'k',
+ 'value': 'k',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 24,
+ 'value': 24,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ -45
+ ],
+ [
+ 45,
+ -45
+ ],
+ [
+ 45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 20,
+ 'geohash': 'u',
+ 'center': [
+ 22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'u',
+ 'value': 'u',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 20,
+ 'value': 20,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 0,
+ 45
+ ],
+ [
+ 45,
+ 45
+ ],
+ [
+ 45,
+ 90
+ ],
+ [
+ 0,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 18,
+ 'geohash': '9',
+ 'center': [
+ -112.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '9',
+ 'value': '9',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 18,
+ 'value': 18,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 0
+ ],
+ [
+ -90,
+ 0
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 14,
+ 'geohash': 'v',
+ 'center': [
+ 67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'v',
+ 'value': 'v',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 14,
+ 'value': 14,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ 45
+ ],
+ [
+ 90,
+ 45
+ ],
+ [
+ 90,
+ 90
+ ],
+ [
+ 45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 11,
+ 'geohash': 'e',
+ 'center': [
+ -22.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'e',
+ 'value': 'e',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 11,
+ 'value': 11,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 9,
+ 'geohash': 'r',
+ 'center': [
+ 157.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'r',
+ 'value': 'r',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 9,
+ 'value': 9,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ -45
+ ],
+ [
+ 180,
+ -45
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 135,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'y',
+ 'center': [
+ 112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'y',
+ 'value': 'y',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ],
+ [
+ 135,
+ 90
+ ],
+ [
+ 90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 6,
+ 'geohash': 'f',
+ 'center': [
+ -67.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'f',
+ 'value': 'f',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 6,
+ 'value': 6,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ 45
+ ],
+ [
+ -45,
+ 45
+ ],
+ [
+ -45,
+ 90
+ ],
+ [
+ -90,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 5,
+ 'geohash': 'g',
+ 'center': [
+ -22.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'g',
+ 'value': 'g',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 5,
+ 'value': 5,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ 45
+ ],
+ [
+ 0,
+ 45
+ ],
+ [
+ 0,
+ 90
+ ],
+ [
+ -45,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -112.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 5,
+ 'geohash': 'c',
+ 'center': [
+ -112.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'c',
+ 'value': 'c',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 5,
+ 'value': 5,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -135,
+ 45
+ ],
+ [
+ -90,
+ 45
+ ],
+ [
+ -90,
+ 90
+ ],
+ [
+ -135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 4,
+ 'geohash': 'b',
+ 'center': [
+ -157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'b',
+ 'value': 'b',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 4,
+ 'value': 4,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -180,
+ 45
+ ],
+ [
+ -135,
+ 45
+ ],
+ [
+ -135,
+ 90
+ ],
+ [
+ -180,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 112.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 3,
+ 'geohash': 'q',
+ 'center': [
+ 112.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'q',
+ 'value': 'q',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 3,
+ 'value': 3,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 90,
+ -45
+ ],
+ [
+ 135,
+ -45
+ ],
+ [
+ 135,
+ 0
+ ],
+ [
+ 90,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -67.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 2,
+ 'geohash': '4',
+ 'center': [
+ -67.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '4',
+ 'value': '4',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 2,
+ 'value': 2,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -90,
+ -90
+ ],
+ [
+ -45,
+ -90
+ ],
+ [
+ -45,
+ -45
+ ],
+ [
+ -90,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'z',
+ 'center': [
+ 157.5,
+ 67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'z',
+ 'value': 'z',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 45
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 180,
+ 90
+ ],
+ [
+ 135,
+ 90
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ 22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'x',
+ 'center': [
+ 157.5,
+ 22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'x',
+ 'value': 'x',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ 0
+ ],
+ [
+ 180,
+ 0
+ ],
+ [
+ 180,
+ 45
+ ],
+ [
+ 135,
+ 45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 157.5,
+ -67.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'p',
+ 'center': [
+ 157.5,
+ -67.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'p',
+ 'value': 'p',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 135,
+ -90
+ ],
+ [
+ 180,
+ -90
+ ],
+ [
+ 180,
+ -45
+ ],
+ [
+ 135,
+ -45
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ 67.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': 'm',
+ 'center': [
+ 67.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 'm',
+ 'value': 'm',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ 45,
+ -45
+ ],
+ [
+ 90,
+ -45
+ ],
+ [
+ 90,
+ 0
+ ],
+ [
+ 45,
+ 0
+ ]
+ ]
+ }
+ },
+ {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [
+ -22.5,
+ -22.5
+ ]
+ },
+ 'properties': {
+ 'value': 1,
+ 'geohash': '7',
+ 'center': [
+ -22.5,
+ -22.5
+ ],
+ 'aggConfigResult': {
+ '$parent': {
+ '$parent': {
+ '$parent': null,
+ 'key': 'IN',
+ 'value': 'IN',
+ 'aggConfig': {
+ 'id': '3',
+ 'type': 'terms',
+ 'schema': 'split',
+ 'params': {
+ 'field': 'geo.dest',
+ 'size': 2,
+ 'order': 'desc',
+ 'orderBy': '1',
+ 'row': true
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': '7',
+ 'value': '7',
+ 'aggConfig': {
+ 'id': '2',
+ 'type': 'geohash_grid',
+ 'schema': 'segment',
+ 'params': {
+ 'field': 'geo.coordinates',
+ 'precision': 1
+ }
+ },
+ 'type': 'bucket'
+ },
+ 'key': 1,
+ 'value': 1,
+ 'aggConfig': {
+ 'id': '1',
+ 'type': 'count',
+ 'schema': 'metric',
+ 'params': {}
+ },
+ 'type': 'metric'
+ },
+ 'rectangle': [
+ [
+ -45,
+ -45
+ ],
+ [
+ 0,
+ -45
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -45,
+ 0
+ ]
+ ]
+ }
+ }
+ ],
+ 'properties': {
+ 'min': 1,
+ 'max': 31
+ }
+ }
+ }
+ ],
+ 'hits': 1639
+};
diff --git a/bin/fixtures/vislib/mock_data/histogram/_columns.js b/bin/fixtures/vislib/mock_data/histogram/_columns.js
new file mode 100644
index 00000000000000..aa022fefa2a05e
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/histogram/_columns.js
@@ -0,0 +1,346 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'columns': [
+ {
+ 'label': '404: response',
+ 'xAxisLabel': 'machine.ram',
+ 'ordered': {
+ 'interval': 100
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 2147483600,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 3221225400,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 4294967200,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 5368709100,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 6442450900,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 7516192700,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 8589934500,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 10737418200,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 11811160000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 12884901800,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 13958643700,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 15032385500,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 16106127300,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 18253611000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 19327352800,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 20401094600,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 21474836400,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '200: response',
+ 'xAxisLabel': 'machine.ram',
+ 'ordered': {
+ 'interval': 100
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 2147483600,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 3221225400,
+ 'y': 2,
+ 'y0': 0
+ },
+ {
+ 'x': 4294967200,
+ 'y': 3,
+ 'y0': 0
+ },
+ {
+ 'x': 5368709100,
+ 'y': 3,
+ 'y0': 0
+ },
+ {
+ 'x': 6442450900,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 7516192700,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 8589934500,
+ 'y': 4,
+ 'y0': 0
+ },
+ {
+ 'x': 10737418200,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 11811160000,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 12884901800,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 13958643700,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 15032385500,
+ 'y': 2,
+ 'y0': 0
+ },
+ {
+ 'x': 16106127300,
+ 'y': 3,
+ 'y0': 0
+ },
+ {
+ 'x': 18253611000,
+ 'y': 4,
+ 'y0': 0
+ },
+ {
+ 'x': 19327352800,
+ 'y': 5,
+ 'y0': 0
+ },
+ {
+ 'x': 20401094600,
+ 'y': 2,
+ 'y0': 0
+ },
+ {
+ 'x': 21474836400,
+ 'y': 2,
+ 'y0': 0
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '503: response',
+ 'xAxisLabel': 'machine.ram',
+ 'ordered': {
+ 'interval': 100
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 2147483600,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 3221225400,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 4294967200,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 5368709100,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 6442450900,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 7516192700,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 8589934500,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 10737418200,
+ 'y': 1,
+ 'y0': 0
+ },
+ {
+ 'x': 11811160000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 12884901800,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 13958643700,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 15032385500,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 16106127300,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 18253611000,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 19327352800,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 20401094600,
+ 'y': 0,
+ 'y0': 0
+ },
+ {
+ 'x': 21474836400,
+ 'y': 0,
+ 'y0': 0
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 40
+};
diff --git a/bin/fixtures/vislib/mock_data/histogram/_rows.js b/bin/fixtures/vislib/mock_data/histogram/_rows.js
new file mode 100644
index 00000000000000..bf15c31b9ceb5e
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/histogram/_rows.js
@@ -0,0 +1,187 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'rows': [
+ {
+ 'label': '404: response',
+ 'xAxisLabel': 'machine.ram',
+ 'ordered': {
+ 'interval': 100
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 2147483600,
+ 'y': 1
+ },
+ {
+ 'x': 10737418200,
+ 'y': 1
+ },
+ {
+ 'x': 15032385500,
+ 'y': 2
+ },
+ {
+ 'x': 19327352800,
+ 'y': 1
+ },
+ {
+ 'x': 32212254700,
+ 'y': 1
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '200: response',
+ 'xAxisLabel': 'machine.ram',
+ 'ordered': {
+ 'interval': 100
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 3221225400,
+ 'y': 4
+ },
+ {
+ 'x': 4294967200,
+ 'y': 3
+ },
+ {
+ 'x': 5368709100,
+ 'y': 3
+ },
+ {
+ 'x': 6442450900,
+ 'y': 2
+ },
+ {
+ 'x': 7516192700,
+ 'y': 2
+ },
+ {
+ 'x': 8589934500,
+ 'y': 2
+ },
+ {
+ 'x': 9663676400,
+ 'y': 3
+ },
+ {
+ 'x': 11811160000,
+ 'y': 3
+ },
+ {
+ 'x': 12884901800,
+ 'y': 2
+ },
+ {
+ 'x': 13958643700,
+ 'y': 1
+ },
+ {
+ 'x': 15032385500,
+ 'y': 2
+ },
+ {
+ 'x': 16106127300,
+ 'y': 3
+ },
+ {
+ 'x': 17179869100,
+ 'y': 1
+ },
+ {
+ 'x': 18253611000,
+ 'y': 4
+ },
+ {
+ 'x': 19327352800,
+ 'y': 1
+ },
+ {
+ 'x': 20401094600,
+ 'y': 1
+ },
+ {
+ 'x': 21474836400,
+ 'y': 4
+ },
+ {
+ 'x': 32212254700,
+ 'y': 3
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '503: response',
+ 'xAxisLabel': 'machine.ram',
+ 'ordered': {
+ 'interval': 100
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 10737418200,
+ 'y': 1
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 51
+};
diff --git a/bin/fixtures/vislib/mock_data/histogram/_series.js b/bin/fixtures/vislib/mock_data/histogram/_series.js
new file mode 100644
index 00000000000000..6eb3d10b12b219
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/histogram/_series.js
@@ -0,0 +1,103 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': 'machine.ram',
+ 'ordered': {
+ 'interval': 100
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 3221225400,
+ 'y': 5
+ },
+ {
+ 'x': 4294967200,
+ 'y': 2
+ },
+ {
+ 'x': 5368709100,
+ 'y': 5
+ },
+ {
+ 'x': 6442450900,
+ 'y': 4
+ },
+ {
+ 'x': 7516192700,
+ 'y': 1
+ },
+ {
+ 'x': 9663676400,
+ 'y': 9
+ },
+ {
+ 'x': 10737418200,
+ 'y': 5
+ },
+ {
+ 'x': 11811160000,
+ 'y': 5
+ },
+ {
+ 'x': 12884901800,
+ 'y': 2
+ },
+ {
+ 'x': 13958643700,
+ 'y': 3
+ },
+ {
+ 'x': 15032385500,
+ 'y': 3
+ },
+ {
+ 'x': 16106127300,
+ 'y': 3
+ },
+ {
+ 'x': 17179869100,
+ 'y': 1
+ },
+ {
+ 'x': 18253611000,
+ 'y': 6
+ },
+ {
+ 'x': 19327352800,
+ 'y': 3
+ },
+ {
+ 'x': 20401094600,
+ 'y': 3
+ },
+ {
+ 'x': 21474836400,
+ 'y': 7
+ },
+ {
+ 'x': 32212254700,
+ 'y': 4
+ }
+ ]
+ }
+ ],
+ 'hits': 71,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/histogram/_slices.js b/bin/fixtures/vislib/mock_data/histogram/_slices.js
new file mode 100644
index 00000000000000..0d280cad11bece
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/histogram/_slices.js
@@ -0,0 +1,309 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'label': '',
+ 'slices': {
+ 'children': [
+ {
+ 'name': 0,
+ 'size': 378611,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 1000,
+ 'size': 205997,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 2000,
+ 'size': 397189,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 3000,
+ 'size': 397195,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 4000,
+ 'size': 398429,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 5000,
+ 'size': 397843,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 6000,
+ 'size': 398140,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 7000,
+ 'size': 398076,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 8000,
+ 'size': 396746,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 9000,
+ 'size': 397418,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 10000,
+ 'size': 20222,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 11000,
+ 'size': 20173,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 12000,
+ 'size': 20026,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 13000,
+ 'size': 19986,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 14000,
+ 'size': 20091,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 15000,
+ 'size': 20052,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 16000,
+ 'size': 20349,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 17000,
+ 'size': 20290,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 18000,
+ 'size': 20399,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 19000,
+ 'size': 20133,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ },
+ {
+ 'name': 20000,
+ 'size': 9,
+ 'aggConfig': {
+ 'type': 'histogram',
+ 'schema': 'segment',
+ 'fieldFormatter': _.constant(String),
+ 'params': {
+ 'interval': 1000,
+ 'extended_bounds': {}
+ }
+ }
+ }
+ ]
+ },
+ 'names': [
+ 0,
+ 1000,
+ 2000,
+ 3000,
+ 4000,
+ 5000,
+ 6000,
+ 7000,
+ 8000,
+ 9000,
+ 10000,
+ 11000,
+ 12000,
+ 13000,
+ 14000,
+ 15000,
+ 16000,
+ 17000,
+ 18000,
+ 19000,
+ 20000
+ ],
+ 'hits': 3967374,
+ 'tooltipFormatter': function (event) {
+ return event.point;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/not_enough_data/_one_point.js b/bin/fixtures/vislib/mock_data/not_enough_data/_one_point.js
new file mode 100644
index 00000000000000..c08ba4444e37a3
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/not_enough_data/_one_point.js
@@ -0,0 +1,32 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': '',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': '_all',
+ 'y': 274
+ }
+ ]
+ }
+ ],
+ 'hits': 274,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/range/_columns.js b/bin/fixtures/vislib/mock_data/range/_columns.js
new file mode 100644
index 00000000000000..1ac57060f323d2
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/range/_columns.js
@@ -0,0 +1,59 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'columns': [
+ {
+ 'label': 'apache: _type',
+ 'xAxisLabel': 'bytes ranges',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': '0.0-1000.0',
+ 'y': 13309
+ },
+ {
+ 'x': '1000.0-2000.0',
+ 'y': 7196
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'label': 'nginx: _type',
+ 'xAxisLabel': 'bytes ranges',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': '0.0-1000.0',
+ 'y': 3278
+ },
+ {
+ 'x': '1000.0-2000.0',
+ 'y': 1804
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ 'hits': 171499,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/range/_rows.js b/bin/fixtures/vislib/mock_data/range/_rows.js
new file mode 100644
index 00000000000000..3868b0ff9b27bb
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/range/_rows.js
@@ -0,0 +1,84 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'rows': [
+ {
+ 'label': 'Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1: agent.raw',
+ 'xAxisLabel': 'bytes ranges',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': '0.0-1000.0',
+ 'y': 6422,
+ 'y0': 0
+ },
+ {
+ 'x': '1000.0-2000.0',
+ 'y': 3446,
+ 'y0': 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'label': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24: agent.raw',
+ 'xAxisLabel': 'bytes ranges',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': '0.0-1000.0',
+ 'y': 5430,
+ 'y0': 0
+ },
+ {
+ 'x': '1000.0-2000.0',
+ 'y': 3010,
+ 'y0': 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'label': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322): agent.raw',
+ 'xAxisLabel': 'bytes ranges',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': '0.0-1000.0',
+ 'y': 4735,
+ 'y0': 0
+ },
+ {
+ 'x': '1000.0-2000.0',
+ 'y': 2542,
+ 'y0': 0
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ 'hits': 171501,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/range/_series.js b/bin/fixtures/vislib/mock_data/range/_series.js
new file mode 100644
index 00000000000000..4b5e8f61816958
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/range/_series.js
@@ -0,0 +1,36 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': 'bytes ranges',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': '0.0-1000.0',
+ 'y': 16576
+ },
+ {
+ 'x': '1000.0-2000.0',
+ 'y': 9005
+ }
+ ]
+ }
+ ],
+ 'hits': 171500,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/significant_terms/_columns.js b/bin/fixtures/vislib/mock_data/significant_terms/_columns.js
new file mode 100644
index 00000000000000..3bdaa0dc3954a1
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/significant_terms/_columns.js
@@ -0,0 +1,232 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'columns': [
+ {
+ 'label': 'http: links',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 144000
+ },
+ {
+ 'x': 'info',
+ 'y': 128237
+ },
+ {
+ 'x': 'security',
+ 'y': 34518
+ },
+ {
+ 'x': 'error',
+ 'y': 10258
+ },
+ {
+ 'x': 'warning',
+ 'y': 17188
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'info: links',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 108148
+ },
+ {
+ 'x': 'info',
+ 'y': 96242
+ },
+ {
+ 'x': 'security',
+ 'y': 25889
+ },
+ {
+ 'x': 'error',
+ 'y': 7673
+ },
+ {
+ 'x': 'warning',
+ 'y': 12842
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'www.slate.com: links',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 98056
+ },
+ {
+ 'x': 'info',
+ 'y': 87344
+ },
+ {
+ 'x': 'security',
+ 'y': 23577
+ },
+ {
+ 'x': 'error',
+ 'y': 7004
+ },
+ {
+ 'x': 'warning',
+ 'y': 11759
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'twitter.com: links',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 74154
+ },
+ {
+ 'x': 'info',
+ 'y': 65963
+ },
+ {
+ 'x': 'security',
+ 'y': 17832
+ },
+ {
+ 'x': 'error',
+ 'y': 5258
+ },
+ {
+ 'x': 'warning',
+ 'y': 8906
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'www.www.slate.com: links',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 62591
+ },
+ {
+ 'x': 'info',
+ 'y': 55822
+ },
+ {
+ 'x': 'security',
+ 'y': 15100
+ },
+ {
+ 'x': 'error',
+ 'y': 4564
+ },
+ {
+ 'x': 'warning',
+ 'y': 7498
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 171446
+};
diff --git a/bin/fixtures/vislib/mock_data/significant_terms/_rows.js b/bin/fixtures/vislib/mock_data/significant_terms/_rows.js
new file mode 100644
index 00000000000000..b7d07251b5ca8f
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/significant_terms/_rows.js
@@ -0,0 +1,232 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'rows': [
+ {
+ 'label': 'h3: headings',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 144000
+ },
+ {
+ 'x': 'info',
+ 'y': 128235
+ },
+ {
+ 'x': 'security',
+ 'y': 34518
+ },
+ {
+ 'x': 'error',
+ 'y': 10257
+ },
+ {
+ 'x': 'warning',
+ 'y': 17188
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'h5: headings',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 144000
+ },
+ {
+ 'x': 'info',
+ 'y': 128235
+ },
+ {
+ 'x': 'security',
+ 'y': 34518
+ },
+ {
+ 'x': 'error',
+ 'y': 10257
+ },
+ {
+ 'x': 'warning',
+ 'y': 17188
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'http: headings',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 144000
+ },
+ {
+ 'x': 'info',
+ 'y': 128235
+ },
+ {
+ 'x': 'security',
+ 'y': 34518
+ },
+ {
+ 'x': 'error',
+ 'y': 10257
+ },
+ {
+ 'x': 'warning',
+ 'y': 17188
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'success: headings',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 120689
+ },
+ {
+ 'x': 'info',
+ 'y': 107621
+ },
+ {
+ 'x': 'security',
+ 'y': 28916
+ },
+ {
+ 'x': 'error',
+ 'y': 8590
+ },
+ {
+ 'x': 'warning',
+ 'y': 14548
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': 'www.slate.com: headings',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 62292
+ },
+ {
+ 'x': 'info',
+ 'y': 55646
+ },
+ {
+ 'x': 'security',
+ 'y': 14823
+ },
+ {
+ 'x': 'error',
+ 'y': 4441
+ },
+ {
+ 'x': 'warning',
+ 'y': 7539
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 171445
+};
diff --git a/bin/fixtures/vislib/mock_data/significant_terms/_series.js b/bin/fixtures/vislib/mock_data/significant_terms/_series.js
new file mode 100644
index 00000000000000..c4feebaef9d4d4
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/significant_terms/_series.js
@@ -0,0 +1,48 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': 'Top 5 unusual terms in @tags',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'success',
+ 'y': 143995
+ },
+ {
+ 'x': 'info',
+ 'y': 128233
+ },
+ {
+ 'x': 'security',
+ 'y': 34515
+ },
+ {
+ 'x': 'error',
+ 'y': 10256
+ },
+ {
+ 'x': 'warning',
+ 'y': 17188
+ }
+ ]
+ }
+ ],
+ 'hits': 171439,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/stacked/_stacked.js b/bin/fixtures/vislib/mock_data/stacked/_stacked.js
new file mode 100644
index 00000000000000..2df6f83a683075
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/stacked/_stacked.js
@@ -0,0 +1,1572 @@
+var moment = require('moment');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': '@timestamp per 30 sec',
+ 'ordered': {
+ 'date': true,
+ 'interval': 30000,
+ 'min': 1416850340336,
+ 'max': 1416852140336
+ },
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'label': 'jpg',
+ 'values': [
+ {
+ 'x': 1416850320000,
+ 'y': 110,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850350000,
+ 'y': 24,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850380000,
+ 'y': 34,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850410000,
+ 'y': 21,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850440000,
+ 'y': 32,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850470000,
+ 'y': 24,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850500000,
+ 'y': 16,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850530000,
+ 'y': 27,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850560000,
+ 'y': 24,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850590000,
+ 'y': 38,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850620000,
+ 'y': 33,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850650000,
+ 'y': 33,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850680000,
+ 'y': 31,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850710000,
+ 'y': 24,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850740000,
+ 'y': 24,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850770000,
+ 'y': 38,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850800000,
+ 'y': 34,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850830000,
+ 'y': 30,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850860000,
+ 'y': 38,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850890000,
+ 'y': 19,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850920000,
+ 'y': 23,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850950000,
+ 'y': 33,
+ 'y0': 0
+ },
+ {
+ 'x': 1416850980000,
+ 'y': 28,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851010000,
+ 'y': 24,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851040000,
+ 'y': 22,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851070000,
+ 'y': 28,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851100000,
+ 'y': 27,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851130000,
+ 'y': 32,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851160000,
+ 'y': 32,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851190000,
+ 'y': 30,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851220000,
+ 'y': 32,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851250000,
+ 'y': 36,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851280000,
+ 'y': 32,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851310000,
+ 'y': 29,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851340000,
+ 'y': 22,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851370000,
+ 'y': 29,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851400000,
+ 'y': 33,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851430000,
+ 'y': 28,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851460000,
+ 'y': 39,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851490000,
+ 'y': 28,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851520000,
+ 'y': 28,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851550000,
+ 'y': 28,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851580000,
+ 'y': 30,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851610000,
+ 'y': 29,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851640000,
+ 'y': 30,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851670000,
+ 'y': 23,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851700000,
+ 'y': 23,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851730000,
+ 'y': 27,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851760000,
+ 'y': 21,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851790000,
+ 'y': 24,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851820000,
+ 'y': 26,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851850000,
+ 'y': 26,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851880000,
+ 'y': 21,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851910000,
+ 'y': 33,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851940000,
+ 'y': 23,
+ 'y0': 0
+ },
+ {
+ 'x': 1416851970000,
+ 'y': 46,
+ 'y0': 0
+ },
+ {
+ 'x': 1416852000000,
+ 'y': 27,
+ 'y0': 0
+ },
+ {
+ 'x': 1416852030000,
+ 'y': 20,
+ 'y0': 0
+ },
+ {
+ 'x': 1416852060000,
+ 'y': 34,
+ 'y0': 0
+ },
+ {
+ 'x': 1416852090000,
+ 'y': 15,
+ 'y0': 0
+ },
+ {
+ 'x': 1416852120000,
+ 'y': 18,
+ 'y0': 0
+ }
+ ]
+ },
+ {
+ 'label': 'css',
+ 'values': [
+ {
+ 'x': 1416850320000,
+ 'y': 3,
+ 'y0': 11
+ },
+ {
+ 'x': 1416850350000,
+ 'y': 13,
+ 'y0': 24
+ },
+ {
+ 'x': 1416850380000,
+ 'y': 5,
+ 'y0': 34
+ },
+ {
+ 'x': 1416850410000,
+ 'y': 12,
+ 'y0': 21
+ },
+ {
+ 'x': 1416850440000,
+ 'y': 9,
+ 'y0': 32
+ },
+ {
+ 'x': 1416850470000,
+ 'y': 12,
+ 'y0': 24
+ },
+ {
+ 'x': 1416850500000,
+ 'y': 6,
+ 'y0': 16
+ },
+ {
+ 'x': 1416850530000,
+ 'y': 6,
+ 'y0': 27
+ },
+ {
+ 'x': 1416850560000,
+ 'y': 11,
+ 'y0': 24
+ },
+ {
+ 'x': 1416850590000,
+ 'y': 11,
+ 'y0': 38
+ },
+ {
+ 'x': 1416850620000,
+ 'y': 6,
+ 'y0': 33
+ },
+ {
+ 'x': 1416850650000,
+ 'y': 8,
+ 'y0': 33
+ },
+ {
+ 'x': 1416850680000,
+ 'y': 6,
+ 'y0': 31
+ },
+ {
+ 'x': 1416850710000,
+ 'y': 4,
+ 'y0': 24
+ },
+ {
+ 'x': 1416850740000,
+ 'y': 9,
+ 'y0': 24
+ },
+ {
+ 'x': 1416850770000,
+ 'y': 3,
+ 'y0': 38
+ },
+ {
+ 'x': 1416850800000,
+ 'y': 5,
+ 'y0': 34
+ },
+ {
+ 'x': 1416850830000,
+ 'y': 6,
+ 'y0': 30
+ },
+ {
+ 'x': 1416850860000,
+ 'y': 9,
+ 'y0': 38
+ },
+ {
+ 'x': 1416850890000,
+ 'y': 5,
+ 'y0': 19
+ },
+ {
+ 'x': 1416850920000,
+ 'y': 8,
+ 'y0': 23
+ },
+ {
+ 'x': 1416850950000,
+ 'y': 9,
+ 'y0': 33
+ },
+ {
+ 'x': 1416850980000,
+ 'y': 5,
+ 'y0': 28
+ },
+ {
+ 'x': 1416851010000,
+ 'y': 6,
+ 'y0': 24
+ },
+ {
+ 'x': 1416851040000,
+ 'y': 9,
+ 'y0': 22
+ },
+ {
+ 'x': 1416851070000,
+ 'y': 9,
+ 'y0': 28
+ },
+ {
+ 'x': 1416851100000,
+ 'y': 11,
+ 'y0': 27
+ },
+ {
+ 'x': 1416851130000,
+ 'y': 5,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851160000,
+ 'y': 8,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851190000,
+ 'y': 6,
+ 'y0': 30
+ },
+ {
+ 'x': 1416851220000,
+ 'y': 10,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851250000,
+ 'y': 5,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851280000,
+ 'y': 6,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851310000,
+ 'y': 4,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851340000,
+ 'y': 8,
+ 'y0': 22
+ },
+ {
+ 'x': 1416851370000,
+ 'y': 3,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851400000,
+ 'y': 8,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851430000,
+ 'y': 10,
+ 'y0': 28
+ },
+ {
+ 'x': 1416851460000,
+ 'y': 5,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851490000,
+ 'y': 7,
+ 'y0': 28
+ },
+ {
+ 'x': 1416851520000,
+ 'y': 6,
+ 'y0': 28
+ },
+ {
+ 'x': 1416851550000,
+ 'y': 4,
+ 'y0': 28
+ },
+ {
+ 'x': 1416851580000,
+ 'y': 9,
+ 'y0': 30
+ },
+ {
+ 'x': 1416851610000,
+ 'y': 3,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851640000,
+ 'y': 9,
+ 'y0': 30
+ },
+ {
+ 'x': 1416851670000,
+ 'y': 6,
+ 'y0': 23
+ },
+ {
+ 'x': 1416851700000,
+ 'y': 11,
+ 'y0': 23
+ },
+ {
+ 'x': 1416851730000,
+ 'y': 4,
+ 'y0': 27
+ },
+ {
+ 'x': 1416851760000,
+ 'y': 8,
+ 'y0': 21
+ },
+ {
+ 'x': 1416851790000,
+ 'y': 5,
+ 'y0': 24
+ },
+ {
+ 'x': 1416851820000,
+ 'y': 7,
+ 'y0': 26
+ },
+ {
+ 'x': 1416851850000,
+ 'y': 7,
+ 'y0': 26
+ },
+ {
+ 'x': 1416851880000,
+ 'y': 4,
+ 'y0': 21
+ },
+ {
+ 'x': 1416851910000,
+ 'y': 8,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851940000,
+ 'y': 6,
+ 'y0': 23
+ },
+ {
+ 'x': 1416851970000,
+ 'y': 6,
+ 'y0': 46
+ },
+ {
+ 'x': 1416852000000,
+ 'y': 3,
+ 'y0': 27
+ },
+ {
+ 'x': 1416852030000,
+ 'y': 6,
+ 'y0': 20
+ },
+ {
+ 'x': 1416852060000,
+ 'y': 5,
+ 'y0': 34
+ },
+ {
+ 'x': 1416852090000,
+ 'y': 5,
+ 'y0': 15
+ },
+ {
+ 'x': 1416852120000,
+ 'y': 1,
+ 'y0': 18
+ }
+ ]
+ },
+ {
+ 'label': 'gif',
+ 'values': [
+ {
+ 'x': 1416850320000,
+ 'y': 1,
+ 'y0': 14
+ },
+ {
+ 'x': 1416850350000,
+ 'y': 2,
+ 'y0': 37
+ },
+ {
+ 'x': 1416850380000,
+ 'y': 4,
+ 'y0': 39
+ },
+ {
+ 'x': 1416850410000,
+ 'y': 2,
+ 'y0': 33
+ },
+ {
+ 'x': 1416850440000,
+ 'y': 3,
+ 'y0': 41
+ },
+ {
+ 'x': 1416850470000,
+ 'y': 1,
+ 'y0': 36
+ },
+ {
+ 'x': 1416850500000,
+ 'y': 1,
+ 'y0': 22
+ },
+ {
+ 'x': 1416850530000,
+ 'y': 1,
+ 'y0': 33
+ },
+ {
+ 'x': 1416850560000,
+ 'y': 2,
+ 'y0': 35
+ },
+ {
+ 'x': 1416850590000,
+ 'y': 5,
+ 'y0': 49
+ },
+ {
+ 'x': 1416850620000,
+ 'y': 1,
+ 'y0': 39
+ },
+ {
+ 'x': 1416850650000,
+ 'y': 1,
+ 'y0': 41
+ },
+ {
+ 'x': 1416850680000,
+ 'y': 4,
+ 'y0': 37
+ },
+ {
+ 'x': 1416850710000,
+ 'y': 1,
+ 'y0': 28
+ },
+ {
+ 'x': 1416850740000,
+ 'y': 3,
+ 'y0': 33
+ },
+ {
+ 'x': 1416850770000,
+ 'y': 2,
+ 'y0': 41
+ },
+ {
+ 'x': 1416850800000,
+ 'y': 2,
+ 'y0': 39
+ },
+ {
+ 'x': 1416850830000,
+ 'y': 5,
+ 'y0': 36
+ },
+ {
+ 'x': 1416850860000,
+ 'y': 3,
+ 'y0': 47
+ },
+ {
+ 'x': 1416850890000,
+ 'y': 1,
+ 'y0': 24
+ },
+ {
+ 'x': 1416850920000,
+ 'y': 3,
+ 'y0': 31
+ },
+ {
+ 'x': 1416850950000,
+ 'y': 4,
+ 'y0': 42
+ },
+ {
+ 'x': 1416850980000,
+ 'y': 3,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851010000,
+ 'y': 5,
+ 'y0': 30
+ },
+ {
+ 'x': 1416851040000,
+ 'y': 2,
+ 'y0': 31
+ },
+ {
+ 'x': 1416851070000,
+ 'y': 3,
+ 'y0': 37
+ },
+ {
+ 'x': 1416851100000,
+ 'y': 5,
+ 'y0': 38
+ },
+ {
+ 'x': 1416851130000,
+ 'y': 3,
+ 'y0': 37
+ },
+ {
+ 'x': 1416851160000,
+ 'y': 4,
+ 'y0': 40
+ },
+ {
+ 'x': 1416851190000,
+ 'y': 9,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851220000,
+ 'y': 7,
+ 'y0': 42
+ },
+ {
+ 'x': 1416851250000,
+ 'y': 2,
+ 'y0': 41
+ },
+ {
+ 'x': 1416851280000,
+ 'y': 1,
+ 'y0': 38
+ },
+ {
+ 'x': 1416851310000,
+ 'y': 2,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851340000,
+ 'y': 5,
+ 'y0': 30
+ },
+ {
+ 'x': 1416851370000,
+ 'y': 3,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851400000,
+ 'y': 5,
+ 'y0': 41
+ },
+ {
+ 'x': 1416851430000,
+ 'y': 4,
+ 'y0': 38
+ },
+ {
+ 'x': 1416851460000,
+ 'y': 5,
+ 'y0': 44
+ },
+ {
+ 'x': 1416851490000,
+ 'y': 2,
+ 'y0': 35
+ },
+ {
+ 'x': 1416851520000,
+ 'y': 2,
+ 'y0': 34
+ },
+ {
+ 'x': 1416851550000,
+ 'y': 4,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851580000,
+ 'y': 3,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851610000,
+ 'y': 4,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851640000,
+ 'y': 0,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851670000,
+ 'y': 2,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851700000,
+ 'y': 1,
+ 'y0': 34
+ },
+ {
+ 'x': 1416851730000,
+ 'y': 3,
+ 'y0': 31
+ },
+ {
+ 'x': 1416851760000,
+ 'y': 0,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851790000,
+ 'y': 4,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851820000,
+ 'y': 3,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851850000,
+ 'y': 3,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851880000,
+ 'y': 0,
+ 'y0': 25
+ },
+ {
+ 'x': 1416851910000,
+ 'y': 0,
+ 'y0': 41
+ },
+ {
+ 'x': 1416851940000,
+ 'y': 3,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851970000,
+ 'y': 3,
+ 'y0': 52
+ },
+ {
+ 'x': 1416852000000,
+ 'y': 1,
+ 'y0': 30
+ },
+ {
+ 'x': 1416852030000,
+ 'y': 5,
+ 'y0': 26
+ },
+ {
+ 'x': 1416852060000,
+ 'y': 3,
+ 'y0': 39
+ },
+ {
+ 'x': 1416852090000,
+ 'y': 1,
+ 'y0': 20
+ },
+ {
+ 'x': 1416852120000,
+ 'y': 2,
+ 'y0': 19
+ }
+ ]
+ },
+ {
+ 'label': 'png',
+ 'values': [
+ {
+ 'x': 1416850320000,
+ 'y': 1,
+ 'y0': 15
+ },
+ {
+ 'x': 1416850350000,
+ 'y': 6,
+ 'y0': 39
+ },
+ {
+ 'x': 1416850380000,
+ 'y': 6,
+ 'y0': 43
+ },
+ {
+ 'x': 1416850410000,
+ 'y': 5,
+ 'y0': 35
+ },
+ {
+ 'x': 1416850440000,
+ 'y': 3,
+ 'y0': 44
+ },
+ {
+ 'x': 1416850470000,
+ 'y': 5,
+ 'y0': 37
+ },
+ {
+ 'x': 1416850500000,
+ 'y': 6,
+ 'y0': 23
+ },
+ {
+ 'x': 1416850530000,
+ 'y': 1,
+ 'y0': 34
+ },
+ {
+ 'x': 1416850560000,
+ 'y': 3,
+ 'y0': 37
+ },
+ {
+ 'x': 1416850590000,
+ 'y': 2,
+ 'y0': 54
+ },
+ {
+ 'x': 1416850620000,
+ 'y': 1,
+ 'y0': 40
+ },
+ {
+ 'x': 1416850650000,
+ 'y': 1,
+ 'y0': 42
+ },
+ {
+ 'x': 1416850680000,
+ 'y': 2,
+ 'y0': 41
+ },
+ {
+ 'x': 1416850710000,
+ 'y': 5,
+ 'y0': 29
+ },
+ {
+ 'x': 1416850740000,
+ 'y': 7,
+ 'y0': 36
+ },
+ {
+ 'x': 1416850770000,
+ 'y': 2,
+ 'y0': 43
+ },
+ {
+ 'x': 1416850800000,
+ 'y': 3,
+ 'y0': 41
+ },
+ {
+ 'x': 1416850830000,
+ 'y': 6,
+ 'y0': 41
+ },
+ {
+ 'x': 1416850860000,
+ 'y': 2,
+ 'y0': 50
+ },
+ {
+ 'x': 1416850890000,
+ 'y': 4,
+ 'y0': 25
+ },
+ {
+ 'x': 1416850920000,
+ 'y': 2,
+ 'y0': 34
+ },
+ {
+ 'x': 1416850950000,
+ 'y': 3,
+ 'y0': 46
+ },
+ {
+ 'x': 1416850980000,
+ 'y': 8,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851010000,
+ 'y': 4,
+ 'y0': 35
+ },
+ {
+ 'x': 1416851040000,
+ 'y': 4,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851070000,
+ 'y': 1,
+ 'y0': 40
+ },
+ {
+ 'x': 1416851100000,
+ 'y': 2,
+ 'y0': 43
+ },
+ {
+ 'x': 1416851130000,
+ 'y': 4,
+ 'y0': 40
+ },
+ {
+ 'x': 1416851160000,
+ 'y': 3,
+ 'y0': 44
+ },
+ {
+ 'x': 1416851190000,
+ 'y': 4,
+ 'y0': 45
+ },
+ {
+ 'x': 1416851220000,
+ 'y': 2,
+ 'y0': 49
+ },
+ {
+ 'x': 1416851250000,
+ 'y': 4,
+ 'y0': 43
+ },
+ {
+ 'x': 1416851280000,
+ 'y': 8,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851310000,
+ 'y': 4,
+ 'y0': 35
+ },
+ {
+ 'x': 1416851340000,
+ 'y': 4,
+ 'y0': 35
+ },
+ {
+ 'x': 1416851370000,
+ 'y': 7,
+ 'y0': 35
+ },
+ {
+ 'x': 1416851400000,
+ 'y': 2,
+ 'y0': 46
+ },
+ {
+ 'x': 1416851430000,
+ 'y': 3,
+ 'y0': 42
+ },
+ {
+ 'x': 1416851460000,
+ 'y': 3,
+ 'y0': 49
+ },
+ {
+ 'x': 1416851490000,
+ 'y': 3,
+ 'y0': 37
+ },
+ {
+ 'x': 1416851520000,
+ 'y': 4,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851550000,
+ 'y': 3,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851580000,
+ 'y': 4,
+ 'y0': 42
+ },
+ {
+ 'x': 1416851610000,
+ 'y': 5,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851640000,
+ 'y': 3,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851670000,
+ 'y': 3,
+ 'y0': 31
+ },
+ {
+ 'x': 1416851700000,
+ 'y': 2,
+ 'y0': 35
+ },
+ {
+ 'x': 1416851730000,
+ 'y': 5,
+ 'y0': 34
+ },
+ {
+ 'x': 1416851760000,
+ 'y': 4,
+ 'y0': 29
+ },
+ {
+ 'x': 1416851790000,
+ 'y': 5,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851820000,
+ 'y': 1,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851850000,
+ 'y': 3,
+ 'y0': 36
+ },
+ {
+ 'x': 1416851880000,
+ 'y': 6,
+ 'y0': 25
+ },
+ {
+ 'x': 1416851910000,
+ 'y': 4,
+ 'y0': 41
+ },
+ {
+ 'x': 1416851940000,
+ 'y': 7,
+ 'y0': 32
+ },
+ {
+ 'x': 1416851970000,
+ 'y': 5,
+ 'y0': 55
+ },
+ {
+ 'x': 1416852000000,
+ 'y': 2,
+ 'y0': 31
+ },
+ {
+ 'x': 1416852030000,
+ 'y': 2,
+ 'y0': 31
+ },
+ {
+ 'x': 1416852060000,
+ 'y': 4,
+ 'y0': 42
+ },
+ {
+ 'x': 1416852090000,
+ 'y': 6,
+ 'y0': 21
+ },
+ {
+ 'x': 1416852120000,
+ 'y': 2,
+ 'y0': 21
+ }
+ ]
+ },
+ {
+ 'label': 'php',
+ 'values': [
+ {
+ 'x': 1416850320000,
+ 'y': 0,
+ 'y0': 16
+ },
+ {
+ 'x': 1416850350000,
+ 'y': 1,
+ 'y0': 45
+ },
+ {
+ 'x': 1416850380000,
+ 'y': 0,
+ 'y0': 49
+ },
+ {
+ 'x': 1416850410000,
+ 'y': 2,
+ 'y0': 40
+ },
+ {
+ 'x': 1416850440000,
+ 'y': 0,
+ 'y0': 47
+ },
+ {
+ 'x': 1416850470000,
+ 'y': 0,
+ 'y0': 42
+ },
+ {
+ 'x': 1416850500000,
+ 'y': 3,
+ 'y0': 29
+ },
+ {
+ 'x': 1416850530000,
+ 'y': 1,
+ 'y0': 35
+ },
+ {
+ 'x': 1416850560000,
+ 'y': 3,
+ 'y0': 40
+ },
+ {
+ 'x': 1416850590000,
+ 'y': 2,
+ 'y0': 56
+ },
+ {
+ 'x': 1416850620000,
+ 'y': 2,
+ 'y0': 41
+ },
+ {
+ 'x': 1416850650000,
+ 'y': 5,
+ 'y0': 43
+ },
+ {
+ 'x': 1416850680000,
+ 'y': 2,
+ 'y0': 43
+ },
+ {
+ 'x': 1416850710000,
+ 'y': 1,
+ 'y0': 34
+ },
+ {
+ 'x': 1416850740000,
+ 'y': 2,
+ 'y0': 43
+ },
+ {
+ 'x': 1416850770000,
+ 'y': 2,
+ 'y0': 45
+ },
+ {
+ 'x': 1416850800000,
+ 'y': 1,
+ 'y0': 44
+ },
+ {
+ 'x': 1416850830000,
+ 'y': 1,
+ 'y0': 47
+ },
+ {
+ 'x': 1416850860000,
+ 'y': 1,
+ 'y0': 52
+ },
+ {
+ 'x': 1416850890000,
+ 'y': 1,
+ 'y0': 29
+ },
+ {
+ 'x': 1416850920000,
+ 'y': 2,
+ 'y0': 36
+ },
+ {
+ 'x': 1416850950000,
+ 'y': 2,
+ 'y0': 49
+ },
+ {
+ 'x': 1416850980000,
+ 'y': 0,
+ 'y0': 44
+ },
+ {
+ 'x': 1416851010000,
+ 'y': 3,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851040000,
+ 'y': 2,
+ 'y0': 37
+ },
+ {
+ 'x': 1416851070000,
+ 'y': 2,
+ 'y0': 41
+ },
+ {
+ 'x': 1416851100000,
+ 'y': 2,
+ 'y0': 45
+ },
+ {
+ 'x': 1416851130000,
+ 'y': 0,
+ 'y0': 44
+ },
+ {
+ 'x': 1416851160000,
+ 'y': 1,
+ 'y0': 47
+ },
+ {
+ 'x': 1416851190000,
+ 'y': 2,
+ 'y0': 49
+ },
+ {
+ 'x': 1416851220000,
+ 'y': 4,
+ 'y0': 51
+ },
+ {
+ 'x': 1416851250000,
+ 'y': 0,
+ 'y0': 47
+ },
+ {
+ 'x': 1416851280000,
+ 'y': 3,
+ 'y0': 47
+ },
+ {
+ 'x': 1416851310000,
+ 'y': 3,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851340000,
+ 'y': 2,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851370000,
+ 'y': 2,
+ 'y0': 42
+ },
+ {
+ 'x': 1416851400000,
+ 'y': 3,
+ 'y0': 48
+ },
+ {
+ 'x': 1416851430000,
+ 'y': 1,
+ 'y0': 45
+ },
+ {
+ 'x': 1416851460000,
+ 'y': 0,
+ 'y0': 52
+ },
+ {
+ 'x': 1416851490000,
+ 'y': 2,
+ 'y0': 40
+ },
+ {
+ 'x': 1416851520000,
+ 'y': 1,
+ 'y0': 40
+ },
+ {
+ 'x': 1416851550000,
+ 'y': 3,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851580000,
+ 'y': 1,
+ 'y0': 46
+ },
+ {
+ 'x': 1416851610000,
+ 'y': 2,
+ 'y0': 41
+ },
+ {
+ 'x': 1416851640000,
+ 'y': 1,
+ 'y0': 42
+ },
+ {
+ 'x': 1416851670000,
+ 'y': 2,
+ 'y0': 34
+ },
+ {
+ 'x': 1416851700000,
+ 'y': 3,
+ 'y0': 37
+ },
+ {
+ 'x': 1416851730000,
+ 'y': 1,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851760000,
+ 'y': 1,
+ 'y0': 33
+ },
+ {
+ 'x': 1416851790000,
+ 'y': 1,
+ 'y0': 38
+ },
+ {
+ 'x': 1416851820000,
+ 'y': 1,
+ 'y0': 37
+ },
+ {
+ 'x': 1416851850000,
+ 'y': 1,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851880000,
+ 'y': 1,
+ 'y0': 31
+ },
+ {
+ 'x': 1416851910000,
+ 'y': 2,
+ 'y0': 45
+ },
+ {
+ 'x': 1416851940000,
+ 'y': 0,
+ 'y0': 39
+ },
+ {
+ 'x': 1416851970000,
+ 'y': 0,
+ 'y0': 60
+ },
+ {
+ 'x': 1416852000000,
+ 'y': 1,
+ 'y0': 33
+ },
+ {
+ 'x': 1416852030000,
+ 'y': 2,
+ 'y0': 33
+ },
+ {
+ 'x': 1416852060000,
+ 'y': 1,
+ 'y0': 46
+ },
+ {
+ 'x': 1416852090000,
+ 'y': 1,
+ 'y0': 27
+ },
+ {
+ 'x': 1416852120000,
+ 'y': 0,
+ 'y0': 23
+ }
+ ]
+ }
+ ],
+ 'hits': 2595,
+ 'xAxisFormatter': function (thing) {
+ return moment(thing);
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/fixtures/vislib/mock_data/terms/_columns.js b/bin/fixtures/vislib/mock_data/terms/_columns.js
new file mode 100644
index 00000000000000..5ddb10819f5dd7
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/terms/_columns.js
@@ -0,0 +1,142 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'columns': [
+ {
+ 'label': 'logstash: index',
+ 'xAxisLabel': 'Top 5 extension',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'jpg',
+ 'y': 110710
+ },
+ {
+ 'x': 'css',
+ 'y': 27376
+ },
+ {
+ 'x': 'png',
+ 'y': 16664
+ },
+ {
+ 'x': 'gif',
+ 'y': 11264
+ },
+ {
+ 'x': 'php',
+ 'y': 5448
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '2014.11.12: index',
+ 'xAxisLabel': 'Top 5 extension',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'jpg',
+ 'y': 110643
+ },
+ {
+ 'x': 'css',
+ 'y': 27350
+ },
+ {
+ 'x': 'png',
+ 'y': 16648
+ },
+ {
+ 'x': 'gif',
+ 'y': 11257
+ },
+ {
+ 'x': 'php',
+ 'y': 5440
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '2014.11.11: index',
+ 'xAxisLabel': 'Top 5 extension',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'jpg',
+ 'y': 67
+ },
+ {
+ 'x': 'css',
+ 'y': 26
+ },
+ {
+ 'x': 'png',
+ 'y': 16
+ },
+ {
+ 'x': 'gif',
+ 'y': 7
+ },
+ {
+ 'x': 'php',
+ 'y': 8
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 171462
+};
diff --git a/bin/fixtures/vislib/mock_data/terms/_rows.js b/bin/fixtures/vislib/mock_data/terms/_rows.js
new file mode 100644
index 00000000000000..46e06d57f2e4c3
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/terms/_rows.js
@@ -0,0 +1,97 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'rows': [
+ {
+ 'label': '0.0-1000.0: bytes',
+ 'xAxisLabel': 'Top 5 extension',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'jpg',
+ 'y': 3378
+ },
+ {
+ 'x': 'css',
+ 'y': 762
+ },
+ {
+ 'x': 'png',
+ 'y': 527
+ },
+ {
+ 'x': 'gif',
+ 'y': 11258
+ },
+ {
+ 'x': 'php',
+ 'y': 653
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ },
+ {
+ 'label': '1000.0-2000.0: bytes',
+ 'xAxisLabel': 'Top 5 extension',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'jpg',
+ 'y': 6422
+ },
+ {
+ 'x': 'css',
+ 'y': 1591
+ },
+ {
+ 'x': 'png',
+ 'y': 430
+ },
+ {
+ 'x': 'gif',
+ 'y': 8
+ },
+ {
+ 'x': 'php',
+ 'y': 561
+ }
+ ]
+ }
+ ],
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+ }
+ ],
+ 'hits': 171458
+};
diff --git a/bin/fixtures/vislib/mock_data/terms/_series.js b/bin/fixtures/vislib/mock_data/terms/_series.js
new file mode 100644
index 00000000000000..f3732f6061764e
--- /dev/null
+++ b/bin/fixtures/vislib/mock_data/terms/_series.js
@@ -0,0 +1,48 @@
+var _ = require('lodash');
+
+module.exports = {
+ 'label': '',
+ 'xAxisLabel': 'Top 5 extension',
+ 'yAxisLabel': 'Count of documents',
+ 'series': [
+ {
+ 'values': [
+ {
+ 'x': 'jpg',
+ 'y': 110710
+ },
+ {
+ 'x': 'css',
+ 'y': 27389
+ },
+ {
+ 'x': 'png',
+ 'y': 16661
+ },
+ {
+ 'x': 'gif',
+ 'y': 11269
+ },
+ {
+ 'x': 'php',
+ 'y': 5447
+ }
+ ]
+ }
+ ],
+ 'hits': 171476,
+ 'xAxisFormatter': function (val) {
+ if (_.isObject(val)) {
+ return JSON.stringify(val);
+ }
+ else if (val == null) {
+ return '';
+ }
+ else {
+ return '' + val;
+ }
+ },
+ 'tooltipFormatter': function (d) {
+ return d;
+ }
+};
diff --git a/bin/kibana b/bin/kibana
deleted file mode 100755
index 5f2a124b801e88..00000000000000
--- a/bin/kibana
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-SCRIPT=$0
-
-# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
-while [ -h "$SCRIPT" ] ; do
- ls=$(ls -ld "$SCRIPT")
- # Drop everything prior to ->
- link=$(expr "$ls" : '.*-> \(.*\)$')
- if expr "$link" : '/.*' > /dev/null; then
- SCRIPT="$link"
- else
- SCRIPT=$(dirname "$SCRIPT")/"$link"
- fi
-done
-
-DIR="$(dirname "${SCRIPT}")/.."
-NODE="${DIR}/node/bin/node"
-test -x "$NODE" || NODE=$(which node)
-if [ ! -x "$NODE" ]; then
- echo "unable to find usable node.js executable."
- exit 1
-fi
-
-exec "${NODE}" "${DIR}/src/cli" ${@}
-
diff --git a/bin/kibana.bat b/bin/kibana.bat
deleted file mode 100644
index 53a0df663b9e65..00000000000000
--- a/bin/kibana.bat
+++ /dev/null
@@ -1,25 +0,0 @@
-@echo off
-
-SETLOCAL
-
-set SCRIPT_DIR=%~dp0
-for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI
-
-set NODE=%DIR%\node\node.exe
-for /f "delims=" %%i in ('WHERE node') do set SYS_NODE=%%i
-
-If Not Exist "%NODE%" (
- IF Exist "%SYS_NODE%" (
- set NODE=%SYS_NODE%
- ) else (
- Echo unable to find usable node.js executable.
- Exit /B 1
- )
-)
-
-TITLE Kibana Server
-"%NODE%" "%DIR%\src\cli" %*
-
-:finally
-
-ENDLOCAL
diff --git a/bin/optimize/BaseOptimizer.js b/bin/optimize/BaseOptimizer.js
new file mode 100644
index 00000000000000..0bf12fbde42df4
--- /dev/null
+++ b/bin/optimize/BaseOptimizer.js
@@ -0,0 +1,174 @@
+let { inherits } = require('util');
+let { defaults } = require('lodash');
+let { resolve } = require('path');
+let { writeFile } = require('fs');
+let webpack = require('webpack');
+var Boom = require('boom');
+let DirectoryNameAsMain = require('webpack-directory-name-as-main');
+let ExtractTextPlugin = require('extract-text-webpack-plugin');
+var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
+
+let utils = require('requirefrom')('src/utils');
+let fromRoot = utils('fromRoot');
+let babelOptions = require('./babelOptions');
+let babelExclude = [/[\/\\](webpackShims|node_modules|bower_components)[\/\\]/];
+
+class BaseOptimizer {
+ constructor(opts) {
+ this.env = opts.env;
+ this.bundles = opts.bundles;
+ this.profile = opts.profile || false;
+
+ switch (opts.sourceMaps) {
+ case true:
+ this.sourceMaps = 'source-map';
+ break;
+
+ case 'fast':
+ this.sourceMaps = 'cheap-module-eval-source-map';
+ break;
+
+ default:
+ this.sourceMaps = opts.sourceMaps || false;
+ break;
+ }
+
+ this.unsafeCache = opts.unsafeCache || false;
+ if (typeof this.unsafeCache === 'string') {
+ this.unsafeCache = [
+ new RegExp(this.unsafeCache.slice(1, -1))
+ ];
+ }
+ }
+
+ async initCompiler() {
+ if (this.compiler) return this.compiler;
+
+ let compilerConfig = this.getConfig();
+ this.compiler = webpack(compilerConfig);
+
+ this.compiler.plugin('done', stats => {
+ if (!this.profile) return;
+
+ let path = resolve(this.env.workingDir, 'stats.json');
+ let content = JSON.stringify(stats.toJson());
+ writeFile(path, content, function (err) {
+ if (err) throw err;
+ });
+ });
+
+ return this.compiler;
+ }
+
+ getConfig() {
+ let mapQ = this.sourceMaps ? '?sourceMap' : '';
+
+ return {
+ context: fromRoot('.'),
+ entry: this.bundles.toWebpackEntries(),
+
+ devtool: this.sourceMaps,
+ profile: this.profile || false,
+
+ output: {
+ path: this.env.workingDir,
+ filename: '[name].bundle.js',
+ sourceMapFilename: '[file].map',
+ publicPath: '/bundles/',
+ devtoolModuleFilenameTemplate: '[absolute-resource-path]'
+ },
+
+ recordsPath: resolve(this.env.workingDir, 'webpack.records'),
+
+ plugins: [
+ new webpack.ResolverPlugin([
+ new DirectoryNameAsMain()
+ ]),
+ new webpack.NoErrorsPlugin(),
+ new ExtractTextPlugin('[name].style.css', {
+ allChunks: true
+ }),
+ new CommonsChunkPlugin({
+ name: 'commons',
+ filename: 'commons.bundle.js'
+ }),
+ ],
+
+ module: {
+ loaders: [
+ {
+ test: /\.less$/,
+ loader: ExtractTextPlugin.extract(
+ 'style',
+ `css${mapQ}!autoprefixer${mapQ ? mapQ + '&' : '?'}{ "browsers": ["last 2 versions","> 5%"] }!less${mapQ}`
+ )
+ },
+ { test: /\.css$/, loader: ExtractTextPlugin.extract('style', `css${mapQ}`) },
+ { test: /\.jade$/, loader: 'jade' },
+ { test: /\.json$/, loader: 'json' },
+ { test: /\.(html|tmpl)$/, loader: 'raw' },
+ { test: /\.png$/, loader: 'url?limit=10000&name=[path][name].[ext]' },
+ { test: /\.(woff|woff2|ttf|eot|svg|ico)(\?|$)/, loader: 'file?name=[path][name].[ext]' },
+ { test: /[\/\\]src[\/\\](plugins|ui)[\/\\].+\.js$/, loader: `rjs-repack${mapQ}` },
+ {
+ test: /\.js$/,
+ exclude: babelExclude.concat(this.env.noParse),
+ loader: 'babel',
+ query: babelOptions.webpack
+ },
+ {
+ test: /\.jsx$/,
+ exclude: babelExclude.concat(this.env.noParse),
+ loader: 'babel',
+ query: defaults({
+ nonStandard: true,
+ }, babelOptions.webpack)
+ }
+ ].concat(this.env.loaders),
+ postLoaders: this.env.postLoaders || [],
+ noParse: this.env.noParse,
+ },
+
+ resolve: {
+ extensions: ['.js', '.json', '.jsx', '.less', ''],
+ postfixes: [''],
+ modulesDirectories: ['webpackShims', 'node_modules'],
+ loaderPostfixes: ['-loader', ''],
+ root: fromRoot('.'),
+ alias: this.env.aliases,
+ unsafeCache: this.unsafeCache,
+ },
+ };
+ }
+
+ failedStatsToError(stats) {
+ let statFormatOpts = {
+ hash: false, // add the hash of the compilation
+ version: false, // add webpack version information
+ timings: false, // add timing information
+ assets: false, // add assets information
+ chunks: false, // add chunk information
+ chunkModules: false, // add built modules information to chunk information
+ modules: false, // add built modules information
+ cached: false, // add also information about cached (not built) modules
+ reasons: false, // add information about the reasons why modules are included
+ source: false, // add the source code of modules
+ errorDetails: false, // add details to errors (like resolving log)
+ chunkOrigins: false, // add the origins of chunks and chunk merging info
+ modulesSort: false, // (string) sort the modules by that field
+ chunksSort: false, // (string) sort the chunks by that field
+ assetsSort: false, // (string) sort the assets by that field
+ children: false,
+ };
+
+ let details = stats.toString(defaults({ colors: true }, statFormatOpts));
+
+ return Boom.create(
+ 500,
+ `Optimizations failure.\n${details.split('\n').join('\n ')}\n`,
+ stats.toJson(statFormatOpts)
+ );
+ }
+}
+
+module.exports = BaseOptimizer;
diff --git a/bin/optimize/FsOptimizer.js b/bin/optimize/FsOptimizer.js
new file mode 100644
index 00000000000000..0d35439a5a6444
--- /dev/null
+++ b/bin/optimize/FsOptimizer.js
@@ -0,0 +1,28 @@
+let { fromNode } = require('bluebird');
+let { writeFile } = require('fs');
+
+let BaseOptimizer = require('./BaseOptimizer');
+let fromRoot = require('../utils/fromRoot');
+
+module.exports = class FsOptimizer extends BaseOptimizer {
+ async init() {
+ await this.initCompiler();
+ }
+
+ async run() {
+ if (!this.compiler) await this.init();
+
+ let stats = await fromNode(cb => {
+ this.compiler.run((err, stats) => {
+ if (err || !stats) return cb(err);
+
+ if (stats.hasErrors() || stats.hasWarnings()) {
+ return cb(this.failedStatsToError(stats));
+ }
+ else {
+ cb(null, stats);
+ }
+ });
+ });
+ }
+};
diff --git a/bin/optimize/babelOptions.build.js b/bin/optimize/babelOptions.build.js
new file mode 100644
index 00000000000000..0a28899fac0561
--- /dev/null
+++ b/bin/optimize/babelOptions.build.js
@@ -0,0 +1,16 @@
+var cloneDeep = require('lodash').cloneDeep;
+var fromRoot = require('path').resolve.bind(null, __dirname, '../../');
+process.env.BABEL_CACHE_PATH = fromRoot('optimize/.babelcache.json');
+
+exports.webpack = {
+ stage: 1,
+ nonStandard: false,
+ optional: ['runtime']
+};
+
+exports.node = cloneDeep({
+ ignore: [
+ fromRoot('src'),
+ /[\\\/](node_modules|bower_components)[\\\/]/
+ ]
+}, exports.webpack);
diff --git a/bin/optimize/babelOptions.js b/bin/optimize/babelOptions.js
new file mode 100644
index 00000000000000..e8fb666a14c7f3
--- /dev/null
+++ b/bin/optimize/babelOptions.js
@@ -0,0 +1,11 @@
+var cloneDeep = require('lodash').cloneDeep;
+var fromRoot = require('path').resolve.bind(null, __dirname, '../../');
+process.env.BABEL_CACHE_PATH = fromRoot('optimize/.babelcache.json');
+
+exports.webpack = {
+ stage: 1,
+ nonStandard: false,
+ optional: ['runtime']
+};
+
+exports.node = cloneDeep(exports.webpack);
diff --git a/bin/optimize/index.js b/bin/optimize/index.js
new file mode 100644
index 00000000000000..1b2cf69e92e466
--- /dev/null
+++ b/bin/optimize/index.js
@@ -0,0 +1,55 @@
+module.exports = async (kbnServer, server, config) => {
+ if (!config.get('optimize.enabled')) return;
+
+ // the lazy optimizer sets up two threads, one is the server listening
+ // on 5601 and the other is a server listening on 5602 that builds the
+ // bundles in a "middleware" style.
+ //
+ // the server listening on 5601 may be restarted a number of times, depending
+ // on the watch setup managed by the cli. It proxies all bundles/* requests to
+ // the other server. The server on 5602 is long running, in order to prevent
+ // complete rebuilds of the optimize content.
+ let lazy = config.get('optimize.lazy');
+ if (lazy) {
+ return await kbnServer.mixin(require('./lazy/lazy'));
+ }
+
+ let bundles = kbnServer.bundles;
+ server.exposeStaticDir('/bundles/{path*}', bundles.env.workingDir);
+ await bundles.writeEntryFiles();
+
+ // in prod, only bundle what looks invalid or missing
+ if (config.get('optimize.useBundleCache')) {
+ bundles = await bundles.getInvalidBundles();
+ }
+
+ // we might not have any work to do
+ if (!bundles.getIds().length) {
+ server.log(
+ ['debug', 'optimize'],
+ `All bundles are cached and ready to go!`
+ );
+ return;
+ }
+
+ // only require the FsOptimizer when we need to
+ let FsOptimizer = require('./FsOptimizer');
+ let optimizer = new FsOptimizer({
+ env: bundles.env,
+ bundles: bundles,
+ profile: config.get('optimize.profile'),
+ sourceMaps: config.get('optimize.sourceMaps'),
+ unsafeCache: config.get('optimize.unsafeCache'),
+ });
+
+ server.log(
+ ['info', 'optimize'],
+ `Optimizing and caching ${bundles.desc()}. This may take a few minutes`
+ );
+
+ let start = Date.now();
+ await optimizer.run();
+ let seconds = ((Date.now() - start) / 1000).toFixed(2);
+
+ server.log(['info', 'optimize'], `Optimization of ${bundles.desc()} complete in ${seconds} seconds`);
+};
diff --git a/bin/optimize/lazy/LazyOptimizer.js b/bin/optimize/lazy/LazyOptimizer.js
new file mode 100644
index 00000000000000..a221e2d1ecce74
--- /dev/null
+++ b/bin/optimize/lazy/LazyOptimizer.js
@@ -0,0 +1,117 @@
+let { once, pick, size } = require('lodash');
+let { join } = require('path');
+let Boom = require('boom');
+
+let BaseOptimizer = require('../BaseOptimizer');
+let WeirdControlFlow = require('./WeirdControlFlow');
+
+module.exports = class LazyOptimizer extends BaseOptimizer {
+ constructor(opts) {
+ super(opts);
+ this.log = opts.log || (() => null);
+ this.prebuild = opts.prebuild || false;
+
+ this.timer = {
+ ms: null,
+ start: () => this.timer.ms = Date.now(),
+ end: () => this.timer.ms = ((Date.now() - this.timer.ms) / 1000).toFixed(2)
+ };
+
+ this.build = new WeirdControlFlow();
+ }
+
+ async init() {
+ this.initializing = true;
+
+ await this.bundles.writeEntryFiles();
+ await this.initCompiler();
+
+ this.compiler.plugin('watch-run', (w, webpackCb) => {
+ this.build.work(once(() => {
+ this.timer.start();
+ this.logRunStart();
+ webpackCb();
+ }));
+ });
+
+ this.compiler.plugin('done', stats => {
+ if (!stats.hasErrors() && !stats.hasWarnings()) {
+ this.logRunSuccess();
+ this.build.success();
+ return;
+ }
+
+ let err = this.failedStatsToError(stats);
+ this.logRunFailure(err);
+ this.build.failure(err);
+ this.watching.invalidate();
+ });
+
+ this.watching = this.compiler.watch({ aggregateTimeout: 200 }, err => {
+ if (err) {
+ this.log('fatal', err);
+ process.exit(1);
+ }
+ });
+
+ let buildPromise = this.build.get();
+ if (this.prebuild) await buildPromise;
+
+ this.initializing = false;
+ this.log(['info', 'optimize'], {
+ tmpl: `Lazy optimization of ${this.bundles.desc()} ready`,
+ bundles: this.bundles.getIds()
+ });
+ }
+
+ async getPath(relativePath) {
+ await this.build.get();
+ return join(this.compiler.outputPath, relativePath);
+ }
+
+ bindToServer(server) {
+ server.route({
+ path: '/bundles/{asset*}',
+ method: 'GET',
+ handler: async (request, reply) => {
+ try {
+ let path = await this.getPath(request.params.asset);
+ return reply.file(path);
+ } catch (error) {
+ console.log(error.stack);
+ return reply(error);
+ }
+ }
+ });
+ }
+
+ logRunStart() {
+ this.log(['info', 'optimize'], {
+ tmpl: `Lazy optimization started`,
+ bundles: this.bundles.getIds()
+ });
+ }
+
+ logRunSuccess() {
+ this.log(['info', 'optimize'], {
+ tmpl: 'Lazy optimization <%= status %> in <%= seconds %> seconds',
+ bundles: this.bundles.getIds(),
+ status: 'success',
+ seconds: this.timer.end()
+ });
+ }
+
+ logRunFailure(err) {
+ // errors during initialization to the server, unlike the rest of the
+ // errors produced here. Lets not muddy the console with extra errors
+ if (this.initializing) return;
+
+ this.log(['fatal', 'optimize'], {
+ tmpl: 'Lazy optimization <%= status %> in <%= seconds %> seconds<%= err %>',
+ bundles: this.bundles.getIds(),
+ status: 'failed',
+ seconds: this.timer.end(),
+ err: err
+ });
+ }
+};
diff --git a/bin/optimize/lazy/LazyServer.js b/bin/optimize/lazy/LazyServer.js
new file mode 100644
index 00000000000000..7527cf1505d515
--- /dev/null
+++ b/bin/optimize/lazy/LazyServer.js
@@ -0,0 +1,22 @@
+
+let { Server } = require('hapi');
+let { fromNode } = require('bluebird');
+let Boom = require('boom');
+
+
+module.exports = class LazyServer {
+ constructor(host, port, optimizer) {
+ this.optimizer = optimizer;
+ this.server = new Server();
+ this.server.connection({
+ host: host,
+ port: port
+ });
+ }
+
+ async init() {
+ await this.optimizer.init();
+ this.optimizer.bindToServer(this.server);
+ await fromNode(cb => this.server.start(cb));
+ }
+};
diff --git a/bin/optimize/lazy/WeirdControlFlow.js b/bin/optimize/lazy/WeirdControlFlow.js
new file mode 100644
index 00000000000000..5825c12c93464c
--- /dev/null
+++ b/bin/optimize/lazy/WeirdControlFlow.js
@@ -0,0 +1,58 @@
+
+let { fromNode } = require('bluebird');
+
+module.exports = class WeirdControlFlow {
+ constructor(work) {
+ this.handlers = [];
+ }
+
+ get() {
+ return fromNode(cb => {
+ if (this.ready) return cb();
+ this.handlers.push(cb);
+ this.start();
+ });
+ }
+
+ work(work) {
+ this._work = work;
+ this.stop();
+
+ if (this.handlers.length) {
+ this.start();
+ }
+ }
+
+ start() {
+ if (this.running) return;
+ this.stop();
+ if (this._work) {
+ this.running = true;
+ this._work();
+ }
+ }
+
+ stop() {
+ this.ready = false;
+ this.error = false;
+ this.running = false;
+ }
+
+ success(...args) {
+ this.stop();
+ this.ready = true;
+ this._flush(args);
+ }
+
+ failure(err) {
+ this.stop();
+ this.error = err;
+ this._flush([err]);
+ }
+
+ _flush(args) {
+ for (let fn of this.handlers.splice(0)) {
+ fn.apply(null, args);
+ }
+ }
+};
diff --git a/bin/optimize/lazy/lazy.js b/bin/optimize/lazy/lazy.js
new file mode 100644
index 00000000000000..6d7d6541bcd629
--- /dev/null
+++ b/bin/optimize/lazy/lazy.js
@@ -0,0 +1,35 @@
+module.exports = async (kbnServer, server, config) => {
+
+ let { isWorker } = require('cluster');
+
+ if (!isWorker) {
+ throw new Error(`lazy optimization is only available in "watch" mode`);
+ }
+
+ /**
+ * When running in lazy mode two workers/threads run in one
+ * of the modes: 'optmzr' or 'server'
+ *
+ * optmzr: this thread runs the LiveOptimizer and the LazyServer
+ * which serves the LiveOptimizer's output and blocks requests
+ * while the optimizer is running
+ *
+ * server: this thread runs the entire kibana server and proxies
+ * all requests for /bundles/* to the optmzr
+ *
+ * @param {string} process.env.kbnWorkerType
+ */
+ switch (process.env.kbnWorkerType) {
+ case 'optmzr':
+ await kbnServer.mixin(require('./optmzrRole'));
+ break;
+
+ case 'server':
+ await kbnServer.mixin(require('./proxyRole'));
+ break;
+
+ default:
+ throw new Error(`unknown kbnWorkerType "${process.env.kbnWorkerType}"`);
+ }
+
+};
diff --git a/bin/optimize/lazy/optmzrRole.js b/bin/optimize/lazy/optmzrRole.js
new file mode 100644
index 00000000000000..6558fd50b70797
--- /dev/null
+++ b/bin/optimize/lazy/optmzrRole.js
@@ -0,0 +1,41 @@
+module.exports = async (kbnServer, kibanaHapiServer, config) => {
+
+ let src = require('requirefrom')('src');
+ let fromRoot = src('utils/fromRoot');
+ let LazyServer = require('./LazyServer');
+ let LazyOptimizer = require('./LazyOptimizer');
+
+ let server = new LazyServer(
+ config.get('optimize.lazyHost'),
+ config.get('optimize.lazyPort'),
+ new LazyOptimizer({
+ log: (tags, data) => kibanaHapiServer.log(tags, data),
+ env: kbnServer.bundles.env,
+ bundles: kbnServer.bundles,
+ profile: config.get('optimize.profile'),
+ sourceMaps: config.get('optimize.sourceMaps'),
+ prebuild: config.get('optimize.lazyPrebuild'),
+ unsafeCache: config.get('optimize.unsafeCache'),
+ })
+ );
+
+
+ let ready = false;
+
+ let sendReady = () => {
+ if (!process.connected) return;
+ process.send(['WORKER_BROADCAST', { optimizeReady: ready }]);
+ };
+
+ process.on('message', (msg) => {
+ if (msg && msg.optimizeReady === '?') sendReady();
+ });
+
+
+ sendReady();
+
+ await server.init();
+
+ ready = true;
+ sendReady();
+};
diff --git a/bin/optimize/lazy/proxyRole.js b/bin/optimize/lazy/proxyRole.js
new file mode 100644
index 00000000000000..df13c68b8700bb
--- /dev/null
+++ b/bin/optimize/lazy/proxyRole.js
@@ -0,0 +1,45 @@
+let { fromNode } = require('bluebird');
+let { get, once } = require('lodash');
+
+module.exports = (kbnServer, server, config) => {
+
+ server.route({
+ path: '/bundles/{path*}',
+ method: 'GET',
+ handler: {
+ proxy: {
+ host: config.get('optimize.lazyHost'),
+ port: config.get('optimize.lazyPort'),
+ passThrough: true,
+ xforward: true
+ }
+ },
+ config: {auth: false}
+ });
+
+ return fromNode(cb => {
+ let timeout = setTimeout(() => {
+ cb(new Error('Server timedout waiting for the optimizer to become ready'));
+ }, config.get('optimize.lazyProxyTimeout'));
+
+ let waiting = once(() => {
+ server.log(['info', 'optimize'], 'Waiting for optimizer completion');
+ });
+
+ if (!process.connected) return;
+
+ process.send(['WORKER_BROADCAST', { optimizeReady: '?' }]);
+ process.on('message', (msg) => {
+ switch (get(msg, 'optimizeReady')) {
+ case true:
+ clearTimeout(timeout);
+ cb();
+ break;
+ case false:
+ waiting();
+ break;
+ }
+ });
+ });
+
+};
diff --git a/bin/testUtils/noDigestPromises.js b/bin/testUtils/noDigestPromises.js
new file mode 100644
index 00000000000000..4b57a52f0acee3
--- /dev/null
+++ b/bin/testUtils/noDigestPromises.js
@@ -0,0 +1,38 @@
+var Bluebird = require('bluebird');
+require('ui/promises');
+
+Bluebird.longStackTraces();
+
+/**
+ * replace the Promise service with Bluebird so that tests
+ * can use promises without having to call $rootScope.apply()
+ *
+ * var noDigestPromises = require('testUtils/noDigestPromises');
+ *
+ * describe('some module that does complex shit with promises', function () {
+ * beforeEach(noDigestPromises.activate);
+ *
+ * });
+ */
+
+var active = false;
+
+require('ui/modules')
+.get('kibana')
+.config(function ($provide) {
+ $provide.decorator('Promise', function ($delegate) {
+ return active ? Bluebird : $delegate;
+ });
+});
+
+function activate() { active = true; }
+function deactivate() { active = false; }
+
+module.exports = {
+ activate: activate,
+ deactivate: deactivate,
+ activateForSuite: function () {
+ before(activate);
+ after(deactivate);
+ }
+};
diff --git a/bin/testUtils/simulateKeys.js b/bin/testUtils/simulateKeys.js
new file mode 100644
index 00000000000000..ae3c6c0738b1b8
--- /dev/null
+++ b/bin/testUtils/simulateKeys.js
@@ -0,0 +1,106 @@
+define(function (require) {
+ var $ = require('jquery');
+ var _ = require('lodash');
+ var Promise = require('bluebird');
+ var keyMap = require('ui/utils/key_map');
+ var reverseKeyMap = _.mapValues(_.invert(keyMap), _.ary(_.parseInt, 1));
+ var KeyboardEvent = window.KeyboardEvent;
+
+ /**
+ * Simulate keyboard events in an element. This allows testing the way that
+ * elements respond to keyboard input.
+ *
+ * # sequence style
+ * keyboard events occur in a sequence, this array of events describe that sequence.
+ *
+ * ## event
+ * an object with a type property, or a string which will be turned into a single press
+ *
+ * ## event types
+ * ### press
+ * represents a key press
+ * - `key`: the key for the button pressed
+ * - `events`: optional list of events that occur before this press completes
+ *
+ * ### wait
+ * represents a pause in a sequence
+ * - `ms`: the number of milliseconds that the pause takes
+ *
+ * ### repeat
+ * represents a key being repeated because it is held down. Should only exist as a
+ * sub event of `press` events.
+ * - `count`: the number of times the repeat occurs
+ *
+ * @param {element} $el - jQuery element where events should occur
+ * @param {[type]} sequence - an array of events
+ * @async
+ */
+ return function ($el, sequence) {
+ var modifierState = {
+ ctrlKey: false,
+ shiftKey: false,
+ altKey: false,
+ metaKey: false
+ };
+
+ return doList(_.clone(sequence));
+
+ function setModifier(key, state) {
+ var name = key + 'Key';
+ if (modifierState.hasOwnProperty(name)) {
+ modifierState[name] = !!state;
+ }
+ }
+
+ function doList(list) {
+ return Promise.try(function () {
+ if (!list || !list.length) return;
+
+ var event = list[0];
+ if (_.isString(event)) {
+ event = { type: 'press', key: event };
+ }
+
+ switch (event.type) {
+ case 'press':
+ return Promise.resolve()
+ .then(_.partial(fire, 'keydown', event.key))
+ .then(_.partial(fire, 'keypress', event.key))
+ .then(_.partial(doList, event.events))
+ .then(_.partial(fire, 'keyup', event.key));
+
+ case 'wait':
+ return Promise.delay(event.ms);
+
+ case 'repeat':
+ return (function again(remaining) {
+ if (!remaining) return Promise.resolve();
+ remaining = remaining - 1;
+ return Promise.resolve()
+ .then(_.partial(fire, 'keydown', event.key, true))
+ .then(_.partial(fire, 'keypress', event.key, true))
+ .then(_.partial(again, remaining));
+ }(event.count));
+
+ default:
+ throw new TypeError('invalid event type "' + event.type + '"');
+ }
+ })
+ .then(function () {
+ if (_.size(list) > 1) return doList(list.slice(1));
+ });
+ }
+
+ function fire(type, key, repeat) {
+ var keyCode = reverseKeyMap[key];
+ if (!keyCode) throw new TypeError('invalid key "' + key + '"');
+
+ if (type === 'keydown') setModifier(key, true);
+ if (type === 'keyup') setModifier(key, false);
+
+ var $target = _.isFunction($el) ? $el() : $el;
+ var $event = new $.Event(type, _.defaults({ keyCode: keyCode }, modifierState));
+ $target.trigger($event);
+ }
+ };
+});
diff --git a/bin/testUtils/stubIndexPattern.js b/bin/testUtils/stubIndexPattern.js
new file mode 100644
index 00000000000000..a4338c9b553ed7
--- /dev/null
+++ b/bin/testUtils/stubIndexPattern.js
@@ -0,0 +1,46 @@
+define(function (require) {
+ return function (Private) {
+ var _ = require('lodash');
+ var sinon = require('sinon');
+ var Promise = require('bluebird');
+ var IndexedArray = require('ui/IndexedArray');
+ var IndexPattern = require('ui/index_patterns/_index_pattern');
+ var fieldFormats = Private(require('ui/registry/field_formats'));
+ var flattenHit = Private(require('ui/index_patterns/_flatten_hit'));
+ var formatHit = require('ui/index_patterns/_format_hit');
+ var getComputedFields = require('ui/index_patterns/_get_computed_fields');
+
+ var Field = Private(require('ui/index_patterns/_field'));
+
+ function StubIndexPattern(pattern, timeField, fields) {
+ this.id = pattern;
+ this.popularizeField = sinon.spy();
+ this.timeFieldName = timeField;
+ this.getNonScriptedFields = sinon.spy();
+ this.getScriptedFields = sinon.spy();
+ this.metaFields = ['_id', '_type', '_source'];
+ this.fieldFormatMap = {};
+ this.routes = IndexPattern.prototype.routes;
+
+ this.toIndexList = _.constant(Promise.resolve([pattern]));
+ this.getComputedFields = _.bind(getComputedFields, this);
+ this.flattenHit = flattenHit(this);
+ this.formatHit = formatHit(this, fieldFormats.getDefaultInstance('string'));
+ this.formatField = this.formatHit.formatField;
+
+ this._indexFields = function () {
+ this.fields = new IndexedArray({
+ index: ['name'],
+ group: ['type'],
+ initialSet: fields.map(function (field) {
+ return new Field(this, field);
+ }, this)
+ });
+ };
+
+ this._indexFields();
+ }
+
+ return StubIndexPattern;
+ };
+});
diff --git a/config/kibana.yml b/config/kibana.yml
index cd5569bbbd8b67..024319eb99f492 100644
--- a/config/kibana.yml
+++ b/config/kibana.yml
@@ -70,3 +70,6 @@
# Set this to true to log all events, including system usage information and all requests.
# logging.verbose: false
+
+auth.enabled: true
+auth.strategy: esProxy
diff --git a/package.json b/package.json
index 2fbb80d4044742..13d800edc53ef7 100644
--- a/package.json
+++ b/package.json
@@ -77,6 +77,7 @@
"babel-core": "5.8.23",
"babel-loader": "5.3.2",
"babel-runtime": "5.8.20",
+ "bcrypt": "^0.8.5",
"bluebird": "2.9.34",
"boom": "2.8.0",
"bootstrap": "3.3.5",
@@ -154,6 +155,7 @@
"gruntify-eslint": "1.0.1",
"html-entities": "1.1.3",
"husky": "0.8.1",
+ "hapi-auth-basic": "^3.0.0",
"intern": "3.0.1",
"istanbul-instrumenter-loader": "0.1.3",
"karma": "0.13.9",
diff --git a/src/cli/plugin/plugin.js b/src/cli/plugin/plugin.js
index ac5a7996784b89..a8a49e445dc6f5 100644
--- a/src/cli/plugin/plugin.js
+++ b/src/cli/plugin/plugin.js
@@ -12,7 +12,7 @@ module.exports = function (program) {
try {
settings = settingParser(command).parse();
} catch (ex) {
- //The logger has not yet been initialized.
+ // The logger has not yet been initialized.
console.error(ex.message);
process.exit(64); // eslint-disable-line no-process-exit
}
@@ -55,15 +55,15 @@ module.exports = function (program) {
Common examples:
-i username/sample
attempts to download the latest version from the following urls:
- https://download.elastic.co/username/sample/sample-latest.tar.gz
- https://github.com/username/sample/archive/master.tar.gz
+ https:// download.elastic.co/username/sample/sample-latest.tar.gz
+ https:// github.com/username/sample/archive/master.tar.gz
-i username/sample/v1.1.1
attempts to download version v1.1.1 from the following urls:
- https://download.elastic.co/username/sample/sample-v1.1.1.tar.gz
- https://github.com/username/sample/archive/v1.1.1.tar.gz
+ https:// download.elastic.co/username/sample/sample-v1.1.1.tar.gz
+ https:// github.com/username/sample/archive/v1.1.1.tar.gz
- -i sample -u http://www.example.com/other_name.tar.gz
+ -i sample -u http:// www.example.com/other_name.tar.gz
attempts to download from the specified url,
and installs the plugin found at that url as "sample"
`
diff --git a/src/plugins/esProxyAuth/index.js b/src/plugins/esProxyAuth/index.js
new file mode 100755
index 00000000000000..9d670f2317506d
--- /dev/null
+++ b/src/plugins/esProxyAuth/index.js
@@ -0,0 +1,45 @@
+let _ = require('lodash');
+let Promise = require('bluebird');
+let strategyMap = require('../../server/auth/lib/authStrategyMap');
+let name = 'esProxy';
+
+module.exports = (kibana) => new kibana.Plugin({
+ require: ['elasticsearch'],
+ init(server, options) {
+ let config = server.config();
+ if (!config.get('auth.enabled') || config.get('auth.strategy') !== name) return;
+ let esPlugin = server.plugins.elasticsearch;
+
+ strategyMap.set(name, {
+ authenticate(request, username, password) {
+ return isValid(username, password).then(() => ({
+ username: username,
+ password: password
+ }));
+ },
+
+ validate(request, session) {
+ // Is it overkill to make this request on every request?
+ return isValid(session.username, session.password).then(() => {
+ _.assign(request.headers, getAuthHeader(session.username, session.password));
+ return true;
+ });
+ }
+ });
+
+ function isValid(username, password) {
+ return Promise.try(() => {
+ if (esPlugin.status.state !== 'green') throw new Error('Elasticsearch client is not ready.');
+
+ return esPlugin.client.info({
+ headers: getAuthHeader(username, password)
+ });
+ });
+ }
+
+ function getAuthHeader(username, password) {
+ let auth = new Buffer(`${username}:${password}`, 'utf8').toString('base64');
+ return {'Authorization': `Basic ${auth}`};
+ }
+ }
+});
\ No newline at end of file
diff --git a/src/plugins/esProxyAuth/package.json b/src/plugins/esProxyAuth/package.json
new file mode 100755
index 00000000000000..3c835c4b0ea90b
--- /dev/null
+++ b/src/plugins/esProxyAuth/package.json
@@ -0,0 +1,4 @@
+{
+ "name": "esProxyAuth",
+ "version": "1.0.0"
+}
\ No newline at end of file
diff --git a/src/plugins/htpasswdAuth/index.js b/src/plugins/htpasswdAuth/index.js
new file mode 100755
index 00000000000000..29f7ce347532c6
--- /dev/null
+++ b/src/plugins/htpasswdAuth/index.js
@@ -0,0 +1,59 @@
+let fs = require('fs');
+let Promise = require('bluebird');
+let htpasswd = require('htpasswd');
+let strategyMap = require('../../server/auth/lib/authStrategyMap');
+let name = 'htpasswd';
+
+module.exports = (kibana) => new kibana.Plugin({
+ config(Joi) {
+ return Joi.object({
+ enabled: Joi.boolean().default(true),
+ path: Joi.string()
+ }).default();
+ },
+
+ init(server, options) {
+ let config = server.config();
+ if (!config.get('auth.enabled') || config.get('auth.strategy') !== name) return;
+ let path = config.get('htpasswdAuth.path');
+ let users = new Map();
+
+ let initialized = Promise.promisify(fs.readFile)(path).then((data) => {
+ let lines = String(data)
+ .replace(/\\r\\n/g, '\n')
+ .split('\n');
+
+ lines.forEach(function (line) {
+ let parts = line.split(':');
+ if (parts.length !== 2) return;
+
+ let username = parts.shift();
+ let hash = parts.shift();
+ users.set(username, hash);
+ });
+ });
+
+ strategyMap.set('htpasswd', {
+ authenticate(request, username, password) {
+ return isValid(username, password).then(function () {
+ return {
+ username: username,
+ password: password
+ };
+ });
+ },
+
+ validate(request, session) {
+ return isValid(session.username, session.password);
+ }
+ });
+
+ function isValid(username, password) {
+ return initialized.then(function () {
+ let hash = users.get(username);
+ if (hash == null || !htpasswd.verify(hash, password)) return Promise.reject(false);
+ return Promise.resolve(true);
+ });
+ }
+ }
+});
\ No newline at end of file
diff --git a/src/plugins/htpasswdAuth/package.json b/src/plugins/htpasswdAuth/package.json
new file mode 100755
index 00000000000000..107ab9d194911c
--- /dev/null
+++ b/src/plugins/htpasswdAuth/package.json
@@ -0,0 +1,4 @@
+{
+ "name": "htpasswdAuth",
+ "version": "1.0.0"
+}
\ No newline at end of file
diff --git a/src/plugins/kibana/public/discover/controllers/discover.js b/src/plugins/kibana/public/discover/controllers/discover.js
index f144362cd7a8e9..7bda7d5920fa26 100644
--- a/src/plugins/kibana/public/discover/controllers/discover.js
+++ b/src/plugins/kibana/public/discover/controllers/discover.js
@@ -90,6 +90,7 @@ define(function (require) {
// config panel templates
$scope.configTemplate = new ConfigTemplate({
+ alert: require('plugins/kibana/discover/partials/alert_search.html'),
load: require('plugins/kibana/discover/partials/load_search.html'),
save: require('plugins/kibana/discover/partials/save_search.html')
});
@@ -285,6 +286,37 @@ define(function (require) {
})
.catch(notify.error);
};
+
+
+ $scope.opts.saveAlert = function () {
+
+ var name=$("#name").val();
+ var query=$("#query").val();
+ var sendTo=$("#sendTo").val();
+ var timeRange=$("#timeRange").val();
+ var triggerCondition=$("#triggerCondition").val();
+ var triggerNumber=$("#triggerNumber").val();
+
+ var enabled=$("#enabled").is(':checked');
+ var jsonData = '{"name":"'+name+'","query":"'+query+'","timeRange":"'+timeRange+'","enabled":"'+enabled+'",'
+ +'"sendTo":"'+sendTo+'","triggerNumber":"'+triggerNumber+'","triggerCondition":"'+triggerCondition+'"}';
+
+ jQuery.ajax({
+ url : "http://localhost:9000/alert/",
+ type : "POST",
+ dataType : "json",
+ contentType : "application/json",
+ data : jsonData,
+ cache : false,
+ success : function(data) {
+ alert("保存成功");
+ },
+ complete : function() {
+ //$("#long").dialog("close");
+ }
+ })
+
+ };
$scope.opts.fetch = $scope.fetch = function () {
// ignore requests to fetch before the app inits
@@ -421,7 +453,7 @@ define(function (require) {
$scope.resetQuery = function () {
kbnUrl.change('/discover/{{id}}', { id: $route.current.params.id });
};
-
+
$scope.newQuery = function () {
kbnUrl.change('/discover');
};
diff --git a/src/plugins/kibana/public/discover/index.html b/src/plugins/kibana/public/discover/index.html
index 9111b3ba53aab6..87b4a8b37f96fd 100644
--- a/src/plugins/kibana/public/discover/index.html
+++ b/src/plugins/kibana/public/discover/index.html
@@ -9,7 +9,7 @@
input-focus
kbn-typeahead-input
ng-model="state.query"
- placeholder="Search..."
+ placeholder="Query String"
aria-label="Search input"
type="text"
class="form-control">
@@ -23,6 +23,17 @@
+
+
+