From 6227cfdb7052a91323f085da41b0b64cb5a30db7 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Thu, 29 Aug 2013 15:05:07 -0700 Subject: [PATCH 1/2] moved the query color to a header, with a similarly colored title for the series --- panels/histogram/module.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panels/histogram/module.js b/panels/histogram/module.js index 5bea7af6190..6745e625e2d 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -429,7 +429,10 @@ angular.module('kibana.histogram', []) if (item) { $tooltip .html( - kbn.query_color_dot(item.series.color, 15) + ' ' + + '' + + '' + ' ' + + (item.series.info.alias || item.series.info.query) + + '
' + item.datapoint[1].toFixed(0) + " @ " + moment(item.datapoint[0]).format('MM/DD HH:mm:ss') ) From 29740110c8ef219b4967512d21a0cc0cd6a9347f Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Thu, 29 Aug 2013 15:23:40 -0700 Subject: [PATCH 2/2] Reverted to the previous "dot only" style of labeling the query a tooltip was referencing when the query is not aliased. --- panels/histogram/module.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/panels/histogram/module.js b/panels/histogram/module.js index 6745e625e2d..84beb1d1b3b 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -426,13 +426,19 @@ angular.module('kibana.histogram', []) var $tooltip = $('
'); elem.bind("plothover", function (event, pos, item) { + var grouping; if (item) { + if (item.series.info.alias) { + grouping = '' + + '' + ' ' + + item.series.info.alias + + '
'; + } else { + grouping = kbn.query_color_dot(item.series.color, 15) + ' '; + } $tooltip .html( - '' + - '' + ' ' + - (item.series.info.alias || item.series.info.query) + - '
' + + grouping + item.datapoint[1].toFixed(0) + " @ " + moment(item.datapoint[0]).format('MM/DD HH:mm:ss') )