Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Histogram: tool tip improvement #388

Closed
wants to merge 2 commits into from
Closed

Histogram: tool tip improvement #388

wants to merge 2 commits into from

Conversation

nikicat
Copy link

@nikicat nikicat commented Aug 20, 2013

This patch adds series' label to histogram tool tip and corrects value for stacked graphs.

@bobrik
Copy link

bobrik commented Aug 25, 2013

If series has no "alias" then you end up with empty space after "=". I think showing query in this case is better:

diff --git a/panels/histogram/module.js b/panels/histogram/module.js
index 60b823f..859651f 100644
--- a/panels/histogram/module.js
+++ b/panels/histogram/module.js
@@ -418,7 +418,8 @@ angular.module('kibana.histogram', [])
             "<div style='vertical-align:middle;display:inline-block;background:"+
             item.series.color+";height:15px;width:15px;border-radius:10px;'></div> "+
             item.datapoint[1].toFixed(0) + " @ " +
-            moment(item.datapoint[0]).format('MM/DD HH:mm:ss'));
+            moment(item.datapoint[0]).format('MM/DD HH:mm:ss') + " = " +
+            (item.series.info.alias || item.series.info.query));
         } else {
           $("#pie-tooltip").remove();
         }

You are right about stacked graphs, but I thin it should be separate pull request.

What do you think?

@nikicat
Copy link
Author

nikicat commented Aug 29, 2013

As I see you've opened pull request for it. I think it's useful too.

@spalger
Copy link
Contributor

spalger commented Aug 29, 2013

Thanks for pointing this out, I think it makes the tooltip more useful.

In regards to the value within a stacked plot: I expected the same behavior you did at first, but after a bit of research it seems that stacked/area plots are designed to show cumulative totals, not just a way to prevent things from overlapping. Because of this, I feel like the current behavior is probably correct.

Closing this for now since #439 will likely be merged soon.

@spalger spalger closed this Aug 29, 2013
@nikicat
Copy link
Author

nikicat commented Aug 30, 2013

I could make a similar patch, but with toggle in a settings panel. Is it OK?

@bobrik
Copy link

bobrik commented Aug 30, 2013

I vote for setting (maybe even enabled by default) for this. This is definitely not obvious.

rashidkpc pushed a commit that referenced this pull request Oct 6, 2014
spalger pushed a commit to spalger/kibana that referenced this pull request Mar 3, 2016
harper-carroll pushed a commit to harper-carroll/kibana that referenced this pull request Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants