[Lens] When a string or number field begins dragging, query its cardinality and use it for suggestions #74260
Labels
enhancement
New value added to drive a business result
Feature:Lens
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
This is a potential improvement to the UX of Lens, assuming that we can overcome the potential UX decrease from making a network request during a drag interaction. Tactics for keeping both a snappy feel and improved suggestions are described later, but first a description of the improvement:
When a user clicks the field preview for a number in Lens, we make two sequential requests:
Then the client determines whether to show a histogram or top 10 values. This is the same decision that suggestions should be making. If the top 10 values are 90% or more of the total values, then we show the top 10 and indicate that there are "other values." If the top 10 values are <90%, then a histogram is shown.
In rough terms, we determine whether the field has high or low cardinality and use it when making the suggestion.
There are two user flows that I would imagine:
day_of_week
. Instead of suggesting "Average day_of_week", we should suggest "Top 10 day_of_week"Both of these flows indicate that we are building "smarter" suggestions out of a simple additional request.
Keeping it fast
It's always a bad practice to make network requests during a fast user interaction, such as while typing. There are some workarounds from simple to complex:
The text was updated successfully, but these errors were encountered: