diff --git a/panels/histogram/editor.html b/panels/histogram/editor.html index 30be4aacbc7cc..6ace9611b6a01 100644 --- a/panels/histogram/editor.html +++ b/panels/histogram/editor.html @@ -1,6 +1,6 @@
- +
@@ -15,8 +15,8 @@ In {{panel.mode}} mode the configured field must be a numeric type
+
Chart Settings
-
Chart Settings
@@ -26,36 +26,43 @@
Chart Settings
- +
- +
-
-
+
+
- +
-
+
-
+
-
+
-
+
-
+
-
+
+
Tooltip Settings
+
+
+ + +
+
\ No newline at end of file diff --git a/panels/histogram/module.js b/panels/histogram/module.js index 5bea7af619006..b3ff837544f9d 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -72,6 +72,9 @@ angular.module('kibana.histogram', []) 'y-axis' : true, percentage : false, interactive : true, + tooltip : { + value_type: 'cumulative' + } }; _.defaults($scope.panel,_d); @@ -426,11 +429,17 @@ angular.module('kibana.histogram', []) var $tooltip = $('
'); elem.bind("plothover", function (event, pos, item) { + var value; if (item) { + if (scope.panel.stack && scope.panel.tooltip.value_type === 'individual') { + value = item.datapoint[1] - item.datapoint[2]; + } else { + value = item.datapoint[1]; + } $tooltip .html( kbn.query_color_dot(item.series.color, 15) + ' ' + - item.datapoint[1].toFixed(0) + " @ " + + value + " @ " + moment(item.datapoint[0]).format('MM/DD HH:mm:ss') ) .place_tt(pos.pageX, pos.pageY);