/elastic-docs-skills:docs-lens-chart-settingsfrom elastic-docs-skills
Verifies Kibana Lens chart UI settings against source code for accurate documentation of chart types, labels, and rendering order.
Ships in elastic-docs-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
When documenting Lens chart settings, always verify labels, options, and rendering order against the Kibana source code. Do NOT guess UI labels.
defaultMessage strings — always extract the exact label.LegendSettings component behaves differently for treemaps vs waffle vs pie based on props.All partition-type charts share code under:
x-pack/platform/plugins/shared/lens/public/visualizations/partition/
├── partition_charts_meta.ts # Per-chart config (toolbar options, legend config)
├── toolbar/
│ ├── style_settings.tsx # Orchestrates Style panel sections
│ ├── titles_and_text_settings.tsx # Slice labels + Slice values options
│ ├── appearance_settings.tsx # Donut hole (pie/donut only)
│ └── legend_settings.tsx # Partition-specific legend wrapper
Shared legend component:
x-pack/platform/plugins/shared/lens/public/shared_components/legend/
├── legend_settings.tsx # Main legend settings (Visibility, Size, Truncation, Nested, Stats)
├── location/legend_location_settings.tsx # Position (only when `location` prop is defined)
└── size/legend_size_settings.tsx # Width/Size dropdown
Each chart type has its own directory under visualizations/:
visualizations/xy/ for bar, line, areavisualizations/heatmap/visualizations/gauge/visualizations/metric/visualizations/tagcloud/For partition charts, start with partition_charts_meta.ts. This file defines per-chart:
toolbar.categoryOptions — Slice labels options (or empty array if none)toolbar.numberOptions — Slice values options (or empty array if none)toolbar.emptySizeRatioOptions — Donut hole options (pie/donut only)toolbar.isDisabled — Whether the Style panel is disabled entirely (waffle)legend.defaultLegendStats — Enables Statistics/Show value in legend (waffle only)legend.hideNestedLegendSwitch — Hides the Nested toggle (waffle)legend.getShowLegendDefault — Default legend visibility behavior for Auto modemaxBuckets — Maximum Group by dimensionsRead toolbar/style_settings.tsx to understand the Style panel structure:
emptySizeRatioOptions exists → renders Appearance accordion + Titles and text accordionPartitionTitlesAndTextSettings directly (no sub-headers)Then read toolbar/titles_and_text_settings.tsx:
categoryOptions renders as the first button group (label: check i18n key xpack.lens.pieChart.labelSliceLabels)numberOptions renders as the second button group (label: check i18n key xpack.lens.pieChart.sliceValues)numberDisplay === 'percent', a Decimal places input appearsIf categoryOptions is empty, the first button group is hidden. If numberOptions is empty, the second button group is hidden. If isDisabled is true, the entire section is disabled/hidden.
Read toolbar/legend_settings.tsx (partition wrapper) to see what props are passed to the shared LegendSettings component. Key props to check:
| Prop | What it controls | How to verify |
|---|---|---|
legendOptions | Visibility options (Auto/Show/Hide) | Always present for all partition charts |
position | Only renders if location is also passed | Partition charts do NOT pass location → Position hidden |
renderNestedLegendSwitch | Nested toggle | !hideNestedLegendSwitch && groups > 1 |
allowedLegendStats | Statistics/Show value | Only if defaultLegendStats defined in chart meta |
legendSize / onLegendSizeChange | Width dropdown | Renders if isVerticalLegend is true |
shouldTruncate / onTruncateLegendChange | Label truncation toggle | Always present when legend not hidden |
showAutoLegendSizeOption | Auto in size dropdown | Only for pre-8.3 visualizations |
Read the shared legend_settings.tsx JSX top to bottom. For partition charts (no location prop), the actual rendering order is:
Settings that do NOT render for partition charts:
location prop (only XY charts pass this)allowedLegendStats.length > 1For each button group or dropdown, check the label or inputDisplay in the options array. Common pitfalls:
| What you might assume | Actual UI label | Source |
|---|---|---|
| "Labels" | "Slice labels" | xpack.lens.pieChart.labelSliceLabels |
| "Values" | "Slice values" | xpack.lens.pieChart.sliceValues |
| "Legend size" | "Width" | xpack.lens.shared.legendSizeSetting.label |
| "Truncate" | "Label truncation" | xpack.lens.shared.labelTruncation |
| "Max lines" | "Line limit" | xpack.lens.shared.maxLinesLabel |
| "Show" (legend) | "Show" | xpack.lens.pieChart.legendVisibility.show |
| Feature | Pie/Donut | Treemap | Mosaic | Waffle |
|---|---|---|---|---|
| Slice labels | Hide/Inside/Auto | Hide/Show | (none) | (none) |
| Slice values | Hide/Integer/Percentage | Hide/Integer/Percentage | Hide/Integer/Percentage | (none) |
| Donut hole | Yes | No | No | No |
| Style panel disabled | No | No | No | Yes |
| Legend Position | No | No | No | No |
| Legend Width | Yes | Yes | Yes | Yes |
| Nested legend | Yes (>1 group) | Yes (>1 group) | Yes (>1 group) | No |
| Show value | No | No | No | Yes |
| Statistics | No | No | No | No |
| Default legend visibility | Auto shows when >1 bucket | Auto hides | Auto hides | Auto shows always |
| Max Group by dimensions | 3 | 2 | 2 | 1 |
| Color mapping | First Group by only | First Group by only | Vertical axis | Group by |
defaultLegendStats.emptySizeRatioOptions is defined (pie/donut).hideNestedLegendSwitch !== true AND multiple Group by dimensions.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub elastic/elastic-docs-skills --plugin elastic-docs-skills25 skills in this plugin
/docs-applies-to-taggingValidate and generate applies_to tags in Elastic documentation, including for cumulative docs across versions and deployment types. Use when writing new docs pages, reviewing existing pages for correct applies_to usage, deciding whether to preserve or replace existing version-scoped content, or when content changes lifecycle state (experimental, preview, beta, GA, deprecated, removed)./docs-check-contradictionsCheck whether newly written or updated documentation contradicts existing content elsewhere in the docs — procedures, concepts, prerequisites, values, names, recommendations, or cross-references — both in the local repo and across all published Elastic docs. Use when the user asks for a contradiction or consistency check on a docs change, or when a docs review runs. Do not trigger on ordinary drafting or editing./docs-check-kibana-oasReview a Kibana PR for OpenAPI Spec (OAS) and API docs compliance against the Elastic API docs checklist, core guidelines, and Kibana quickstart. Checks availability, summaries, descriptions, parameters, examples, tags, links, defaults, enums, deprecation, and generated YAML correctness. Use when reviewing a Kibana PR that touches API routes or OAS output files, or when asked to check OAS, availability, x-state, or API docs compliance on a PR.
/docs-check-styleCheck documentation for Elastic style guide compliance using Vale linter output and style rules. Use when the user asks to check, lint, or review docs for voice, tone, grammar, formatting, accessibility, or word choice issues, or when a docs review runs. Do not trigger on ordinary drafting or editing./docs-content-type-checkerCheck a docs-content page against Elastic content type guidelines (overview, how-to, tutorial, troubleshooting, changelog), or classify a proposed page idea against the content types before drafting. Use when the user asks to check content type compliance, validate page structure, review a doc against content type standards, or decide which content type a planned page should use./docs-draft-feature-docsDraft Elastic documentation for any feature or feature area, from a doc issue, a product pull request, or raw notes. Enforces the docs-content baseline on every draft — verify against product source at HEAD, find the canonical home, place content once, scope it cumulatively — and reads per-area reference files for local conventions when they exist. Use when picking up a doc issue, documenting a shipped or upcoming feature, or turning engineering notes into a page.Other plugins' skills for the same job