diff --git a/panels/histogram/editor.html b/panels/histogram/editor.html index c200849fa6c..8defd4a1db8 100644 --- a/panels/histogram/editor.html +++ b/panels/histogram/editor.html @@ -21,7 +21,7 @@
- +
@@ -62,7 +62,11 @@
Tooltip Settings
- +
+
+ + +
\ No newline at end of file diff --git a/panels/histogram/module.js b/panels/histogram/module.js index b3ff837544f..7a410dd610f 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -73,7 +73,8 @@ angular.module('kibana.histogram', []) percentage : false, interactive : true, tooltip : { - value_type: 'cumulative' + value_type: 'cumulative', + query_as_alias: false } }; @@ -429,8 +430,16 @@ angular.module('kibana.histogram', []) var $tooltip = $('
'); elem.bind("plothover", function (event, pos, item) { - var value; + var group, value; if (item) { + if (item.series.info.alias || scope.panel.tooltip.query_as_alias) { + group = '' + + '' + ' ' + + (item.series.info.alias || item.series.info.query)+ + '
'; + } else { + group = kbn.query_color_dot(item.series.color, 15) + ' '; + } if (scope.panel.stack && scope.panel.tooltip.value_type === 'individual') { value = item.datapoint[1] - item.datapoint[2]; } else { @@ -438,9 +447,7 @@ angular.module('kibana.histogram', []) } $tooltip .html( - kbn.query_color_dot(item.series.color, 15) + ' ' + - value + " @ " + - moment(item.datapoint[0]).format('MM/DD HH:mm:ss') + group + value + " @ " + moment(item.datapoint[0]).format('MM/DD HH:mm:ss') ) .place_tt(pos.pageX, pos.pageY); } else {