docs: unify chart dimension settings into shared snippets (#4773)#7031
Open
florent-leborgne wants to merge 3 commits into
Open
docs: unify chart dimension settings into shared snippets (#4773)#7031florent-leborgne wants to merge 3 commits into
florent-leborgne wants to merge 3 commits into
Conversation
Single-source the bucket dimension "Data" settings (Top values, Date histogram, Intervals, Filters, and Collapse by) shared across Lens chart types into reusable snippets, and bring each page up to standard against the Kibana source: - Add bucket-function snippets and a Collapse by snippet under explore-analyze/_snippets/. - Rewire pie, waffle, treemap, mosaic, heat map, tag cloud, table, bar, line, area, and metric pages to include them. - Add the Filters function to heat map axes and the full function set to the metric breakdown, which were missing. - Place Collapse by once per dimension and only where the UI exposes it (partition dimensions, XY/metric breakdown, table rows). - Neutralize partition-specific wording in the shared advanced-settings snippet so it reads correctly on every chart type. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
Contributor
Contributor
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
Reduce the number of near-identical snippets:
- Merge lens-bucket-top-values and its -secondary variant into one
snippet. The legacy (9.0-9.3) default now states the real rule
("5 for the first dimension and 3 for each additional dimension")
instead of approximating it across two files.
- Point area chart vertical-axis settings at the shared
lens-value-advanced-settings snippet (verified the XY metric options
against Kibana) and remove the redundant area-only variant, which was
an incomplete duplicate.
Co-authored-by: Cursor <cursoragent@cursor.com>
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
This PR addresses #4773 by single-sourcing the bucket dimension Data settings that Lens chart types share (Top values, Date histogram, Intervals, Filters, and Collapse by) into reusable snippets, and by bringing each page up to standard against the Kibana source so the lists are exhaustive and accurate.
Each page now shows only the functions that its dimensions actually support, with the same wording sourced from one place.
New snippets (
explore-analyze/_snippets/)lens-bucket-top-values.md: the Top values function. The default count is verified against source:9on {applies_to}stack: ga 9.4/serverless, and onstack: 9.0-9.3it defaults to5for the first dimension and3for each additional dimension.lens-bucket-date-histogram.md,lens-bucket-intervals.md,lens-bucket-filters.md: the remaining bucket functions.lens-collapse-by.md: the dimension-level Collapse by control.Pages rewired to include the snippets
pie-charts.md,waffle-charts.md,treemap-charts.md,mosaic-charts.md)heat-map-charts.md,tag-cloud-charts.md,tables.mdbar-charts.md,line-charts.md,area-charts.md)metric-charts.mdAccuracy fixes made while single-sourcing (verified against
elastic/kibanaat HEAD)isBucketed, so Filters applies but was undocumented).isBucketedpredicate.Snippet consolidation
lens-value-advanced-settings.mdsnippet and removed the area-only variant, which was an incomplete duplicate of the same XY metric options.Resolves
Closes #4773