-
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
[Lens] Value in legend #101353
[Lens] Value in legend #101353
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. I would consider to add it also to partition charts.
When testing the feature I found some unexpected cases:
- When there's no date histogram by default there are no values
I understand the problem of "picking" the last entry in this configuration, but as is it's pretty confusing.
- There's a problem with empty buckets in date histogram:
- if a category has been hit before, then the empty bucket becomes 0. This becomes even more strange when only some categories are shown as 0 while others don't
- if the empty bucket is at the left of the first data point in a date histogram then the "last bucket" value is shown - which is a bit confusing
I don't think it adds much value there. This is done mostly because it's a small step towards feature parity with TSVB. The other things you noted are dictated by elastic-charts, so I think changing them is outside of the scope of this PR - I guess it would make sense to open an issue (or multiple issues) on the charts repo for this. The question we have to answer is whether these things would stop us from exposing the functionality in Lens. |
@dej611's points are valid but, having now tried it, I don't think it's too bad. at least personally it's sort of how I expect these sorts of hover value features to work. @MichaelMarcialis might feel differently though. I think this is worth shipping with those known areas of polish. We should make sure we create those follow-on issues while it's fresh. Regarding partition/proportion visualizations and this feature, to me this feature adds the most value to dense line graphs so it's okay to ship without. This option decreases the amount of left/right legend label space and increases the need for more legend controls - #100231 & #41418 & elastic/elastic-charts#580 ...but again, still worth it. It's adding more value than we had yesterday (so to speak) |
I think the thing which confused me mostly was starting with an ordinal chart, and see nothing when I've enabled the feature - or better: there's a left "jump" of the legend label. So at first I thought it was broken - didn't realise it also worked "on hover" as there's already the popover for that. Then I moved to date histogram and it was showing something (although some of the bugs above may affect also here), so I tried to hover the chart and saw the interactive value changing. So, for ordinal charts, I see no particular value added compared to the current popover. |
@dej611 What are you suggesting? |
I propose to remove it for ordinal charts, if you agree. Or alternatively to find some "default" value to show in this case. What do you think? |
@dej611 I wanted to avoid the extra complexity because it's such a minor thing, but I see what you are saying. Check out the latest version - the switch is only shown for non-ordinal charts. |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Public APIs missing comments
Async chunks
History
To update your PR or re-run it, just comment with: |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Co-authored-by: Joe Reuter <[email protected]>
I appear to be joining the conversation a few hours late, but I still wanted to chime in. I think the value this PR adds still warrants the merging, but I also share some of the concerns that @dej611 raises above. Out of curiosity, have we considered the following?
Can we show the total count of each legend item across the entire chart prior to hovering? That way, we have something to show for each legend item regardless if the chart is a date histogram and regardless if the user isn't hovering.
I personally find that having the default, not-hovering legend item count only include the last interval in the date histogram very confusing. From my perspective, I would imagine that when not hovering the chart, it would show an overall total count for each legend item (as described above). Only when hovering over the chart would it then scope the count to that particular hover area. I'm not a data scientist however, so if these assumptions are incorrect, please feel free to contradict :) |
@MichaelMarcialis These things are fully controlled by elastic-charts and IMHO should be raised in a separate issue over there if we feel like we want to change this. I have some thoughts around it and think the current behavior makes sense though. Real quick (but IMHO any further discussion should happen in elastic-charts):
|
* master: (90 commits) Fix UI breaks on providing long search keyword in 'Search Box' (elastic#101385) Adds css class to EuiDescriptionListDescription in order to break word on exception details card (elastic#101481) [Lens] Increase timings for drag and drop tests (elastic#101380) [Lens] Fix editor react error on configuration panel (elastic#101367) [Fleet] Move integrations to a separate app (elastic#99848) Fix incorrect message displayed on importing Timeline Templates (elastic#101288) [Cases] RBAC (elastic#95058) [APM] Visual improvements for new APM layout with left navigation (elastic#101360) [master] More precise alerts matching (elastic#99820) [Lens] Value in legend (elastic#101353) Revert "[Reporting] ILM policy for managing reporting indices (elastic#100130)" (elastic#101358) [Discover] Fix header row of data grid in Firefox (elastic#101374) Add link to advanced setting in Discover (elastic#101154) Url service locators (elastic#101045) [Timelion] Update the removal message to mention the exact version (elastic#100994) [Security Solution][Detection Engine] Test cases for alias failure test cases where we don't copy aliases correctly (elastic#101437) [Event Log] Adding `type_id` to saved object array in event log (elastic#100939) [Reporting] Add `location.url` info to console message logs (elastic#101427) [Security Solutions][Detection Engine] Fixes timestamp bugs within source indexes when the formats are not ISO8601 format (elastic#101349) Improve Task Manager instrumentation (elastic#99160) ...
Fixes #95888
Adds a setting for showing value in the legend. It's shown for all xy charts