From 2e724b8dbebe0a9d031e9d92e23d122ed291f7e0 Mon Sep 17 00:00:00 2001 From: Luca Belluccini Date: Fri, 5 Jul 2013 00:04:17 +0200 Subject: [PATCH 1/2] Added feature PIE panel to show Other and Missing --- panels/pie/editor.html | 6 ++++++ panels/pie/module.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/panels/pie/editor.html b/panels/pie/editor.html index bd5d5de33cc4f..864b71d1c6b5c 100644 --- a/panels/pie/editor.html +++ b/panels/pie/editor.html @@ -65,6 +65,12 @@
+
+ +
+
+ +
diff --git a/panels/pie/module.js b/panels/pie/module.js index 008e806cdf581..99038f661e366 100644 --- a/panels/pie/module.js +++ b/panels/pie/module.js @@ -44,6 +44,8 @@ angular.module('kibana.pie', []) tilt : false, legend : true, labels : true, + others : true, + missing : true, mode : "terms", group : "default", default_field : 'DEFAULT', @@ -124,6 +126,10 @@ angular.module('kibana.pie', []) $scope.hits = results.hits.total; $scope.data = []; var k = 0; + if($scope.panel.others && results.facets.pie.other > 0) + results.facets.pie.terms.push({ 'term': 'Other', 'count': results.facets.pie.other }); + if($scope.panel.missing && results.facets.pie.missing > 0) + results.facets.pie.terms.push({ 'term': 'Missing', 'count': results.facets.pie.missing }); _.each(results.facets.pie.terms, function(v) { var slice = { label : v.term, data : v.count }; $scope.data.push(); From a97b621a21b28ffa503557f08468a58f64e6e59e Mon Sep 17 00:00:00 2001 From: Luca Belluccini Date: Fri, 5 Jul 2013 01:01:47 +0200 Subject: [PATCH 2/2] Make PIE panel legend clickable --- panels/pie/module.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/pie/module.html b/panels/pie/module.html index a8ca59bf55baa..27b029c9859d8 100644 --- a/panels/pie/module.html +++ b/panels/pie/module.html @@ -10,7 +10,7 @@
-
+
{{query.label}} ({{query.data[0][1]}})
\ No newline at end of file