-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Histogram: tool tip improvement #388
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
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
…elastic#409) When displaying a stacked area/line chart with multiple data sets we need to fill the dataset with zeros on missing data points. The rendering is affected also: it will hide the filled missing point but will continue to show the area beneath it. fix elastic#388
# [13.5.0](elastic/elastic-charts@v13.4.1...v13.5.0) (2019-10-09) ### Features * **data:** fill datasets with zeros with missing points when stacked ([elastic#409](elastic/elastic-charts#409)) ([ef84fd4](elastic/elastic-charts@ef84fd4)), closes [elastic#388](elastic/elastic-charts#388)
Add ability to fit data of non-stacked line and area charts with a specified fit function type * add fit functions for null y1 values * allow end values to be explicitly set as fallback * add visual regression tests * add unit tests and better testing utils Note: Does not *yet* support stacked charts or `y0` values. This is a future enhancement is being tracked in elastic#450. related to elastic#388
# [14.1.0](elastic/elastic-charts@v14.0.0...v14.1.0) (2019-11-13) ### Features * fit functions for null y1 values ([elastic#416](elastic/elastic-charts#416)) ([e083755](elastic/elastic-charts@e083755)), closes [elastic#450](elastic/elastic-charts#450) [elastic#388](elastic/elastic-charts#388)
This patch adds series' label to histogram tool tip and corrects value for stacked graphs.