-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Conversation
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? |
As I see you've opened pull request for it. I think it's useful too. |
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. |
I could make a similar patch, but with toggle in a settings panel. Is it OK? |
I vote for setting (maybe even enabled by default) for this. This is definitely not obvious. |
2.7.1 heartbeat
This patch adds series' label to histogram tool tip and corrects value for stacked graphs.