[Lens powered by ES|QL] Enable topN support (Other disabled) for non-time-series charts - #290193
Merged
Merged
Conversation
Contributor
Author
|
/ci |
mariairiartef
force-pushed
the
lens/2889-2
branch
from
September 11, 2026 14:12
bd2e8d9 to
ed3b5c5
Compare
Contributor
Author
|
/ci |
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Unknown metric groupsshared async chunks total size
total optimizer output size
Test Failures
History
|
walterra
approved these changes
Sep 15, 2026
walterra
left a comment
Contributor
There was a problem hiding this comment.
Code LGTM, tested locally including the limitations and disabled states, works great!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of kibana-team#2889
Users can Convert to ES|QL for charts that use a single Top values dimension, when “Group remaining values as Other” is turned off.
Generated query shape:
Part of kibana-team#2889. Gates/tooltips for unsupported terms configs landed earlier in #289951.
What changed
sizeSupported in this PR
Works when all of these are true:
Examples: pie/donut; bar with Top values as the only category; metric broken down by Top values only.
Testing dashboard: top-n.ndjson.zip
Remaining to close https://github.com/elastic/kibana-team/issues/2889
This PR does not fully close the issue. Still needed for the issue’s in-scope work:
LIMIT n BY <outer groups>LIMIT BYcapability gateLIMIT BYships)Out of scope
Still not convertible in this PR
LIMIT BY)Test plan
generate_esql_query.top_n.test.tsLIMIT BYfollow-up)