MCPInstall

docs-lens-chart-page

Create or update a Lens chart documentation page following Elastic docs conventions. Use when writing a new chart type page (pie, bar, metric, gauge, heat map, etc.) or updating an existing one in explore-analyze/visualize/charts/. Relies on lens-chart-settings for verifying UI labels against source code.

Installs
146
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/elastic/elastic-docs-skills --skill docs-lens-chart-page
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads docs-lens-chart-page automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

<!-- Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Elasticsearch B.V. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->

Creating Lens Chart Documentation Pages

Use these instructions when creating or updating a documentation page for a Kibana Lens chart type in explore-analyze/visualize/charts/.

Before writing: verify settings against source code

Use the lens-chart-settings skill to verify all UI labels, option values, and rendering order against the Kibana source code before documenting them. Never guess UI labels.

Research resources

Kibana source code paths

Chart typeSource path
Partition (pie, donut, treemap, mosaic, waffle)x-pack/platform/plugins/shared/lens/public/visualizations/partition/
XY (bar, line, area)x-pack/platform/plugins/shared/lens/public/visualizations/xy/
Metricx-pack/platform/plugins/shared/lens/public/visualizations/metric/
Datatablex-pack/platform/plugins/shared/lens/public/visualizations/datatable/

Many visualizations use shared components (in shared_components/) that accept different props per chart. Always check the visualization-specific wrapper to see which props are passed, rather than assuming all shared component options are available.

EUI data visualization guidelines

Existing content to check

  • Main Lens page: explore-analyze/visualize/lens.md — check for content to reference or deduplicate.
  • Other chart pages: explore-analyze/visualize/charts/*.md — follow established patterns.
  • Shared snippets: explore-analyze/_snippets/lens-*.md — reuse instead of duplicating.

Key snippets:

SnippetPurpose
lens-prerequisites.mdPrerequisites paragraph (data views, ES|QL mode)
lens-rank-by-options.mdTop values rank-by options
lens-value-advanced-settings.mdAdvanced settings for value/metric dimensions
lens-breakdown-advanced-settings.mdBreakdown advanced settings
lens-histogram-settings.mdDate histogram settings
line-chart-legend-settings.mdLegend settings including Statistics (line/area)
line-chart-style-settings.mdStyle settings (line/area)

When creating a new chart page, update lens.md to link to it and remove any duplicated content.

File location and frontmatter

Place the file at explore-analyze/visualize/charts/<chart-type>.md with this frontmatter:

---
navigation_title: <Chart type> charts
description: Instructions and best practices for building <chart type> charts with Kibana Lens in Elastic.
---

Chart-specific dimensions

Chart typePrimary dimensionsAdditional dimensions
Pie / DonutSlice by, Metric(none)
Bar / Line / AreaHorizontal axis, Vertical axisBreakdown
MetricPrimary metricSecondary metric, Maximum value
GaugeMetricMinimum value, Maximum value, Goal
TableMetrics, RowsSplit metrics by

Page structure

Follow this exact section order. Every chart page uses it consistently.

1. Title and introduction

# Build <chart type> charts with {{kib}}
  • One paragraph (2-3 sentences): what the chart does and when it's useful. Focus on purpose.
  • Weave in specific actionable constraints (e.g., "works best with a maximum of 6 slices"). Skip generic advice.
  • Do not create a separate "When to use" section.
  • A line: You can create <chart type> charts in {{kib}} using [**Lens**](../lens.md).
  • A hero image of a representative example.

2. "Build a <chart type> chart" section

Include the prerequisites snippet before the stepper:

:::{include} ../../_snippets/lens-prerequisites.md
:::

Then use the stepper directive:

::::::{stepper}

:::::{step} Access Lens
**Lens** is {{kib}}'s main visualization editor. You can access it:
- From a dashboard: On the **Dashboards** page, open or create the dashboard where you want to add a <chart type> chart, then add a new visualization.
- From the **Visualize library** page by creating a new visualization.
:::::

:::::{step} Set the visualization to <Chart type>
New visualizations often start as **Bar** charts.

Using the **Visualization type** dropdown, select **<Chart type>**.
:::::

:::::{step} Define the data to show
[Chart-specific data configuration steps]
:::::

:::::{step} Customize the chart to follow best practices
[Best practices as a definition list]
:::::

:::::{step} Save the chart
- If you accessed Lens from a dashboard, select **Save and return** to save the visualization and add it to that dashboard, or select **Save to library** to add the visualization to the Visualize library and reuse it later.
- If you accessed Lens from the Visualize library, select **Save**. A menu opens and offers you to add the visualization to a dashboard and to the Visualize library.
:::::

::::::

Key conventions:

  • Access Lens and Save the chart steps are identical across all chart pages. Copy them verbatim.
  • Define the data to show lists numbered steps for chart-specific dimensions, then "Optionally:" for additional dimensions. Link dimension names to their settings sections (e.g., [**Slice by**](#slice-by-settings)).
  • Customize the chart uses definition list format. List 4-6 actionable best practices. End with a line pointing to the full settings reference.

3. Advanced scenarios (optional)

Only include when teaching a non-obvious technique users wouldn't discover on their own:

  • Using formulas (e.g., computing error rates as a percentage)
  • Configuring multiple metrics for completion progress (waffle)
  • Setting up dynamic bounds or goals from data (gauge)
  • Defining custom color ranges (heat map)
  • Configuring color bands with thresholds (gauge)

Do NOT create scenarios that are just "use the chart with different fields". For simpler chart types, the Examples section is sufficient.

When including scenarios:

  • Each scenario gets its own ## or ### heading with an anchor ID.
  • Use concrete examples based on Kibana Sample Data when possible.

Sample data considerations

  • The response field in web logs is a text field — KQL filters must use pattern matching (response: 2*), not numeric comparisons.
  • In sample ecommerce data, taxful_total_price and taxless_total_price are identical.
  • Multiple comparable numeric fields are rare. When sample data doesn't support a scenario, use a conceptual example with realistic field names and add a :::note explaining users need to adapt to their data.

4. "<Chart type> settings" section

Document every configuration option in the Lens editor, organized by dimension/panel.

Structure each dimension as:

### <Dimension> settings [<dimension>-settings]

Within each dimension, use two top-level definition list entries: **Data** and **Appearance**.

Data:

  • List all available functions/aggregation types.
  • For each function, document the Field selector first, then function-specific sub-options as nested bullets.
  • Field selector conventions:
    • Top values: Supports up to 4 fields. Multiple fields create multi-term grouping. Fields can be reordered by dragging.
    • Date histogram: Single date field only.
    • Intervals: Single numeric field only.
    • Filters: No field selector (KQL queries reference fields directly).
  • Reuse shared snippets wherever applicable.

Appearance:

  • List visual options: Name, Value format, Color, Series color, Color mapping, etc.

After dimension-specific settings, add a ### General layout section for global settings ({icon}`brush` Style and legend). Split into #### Style settings and #### Legend settings as needed.

Legend settings vary by chart type:

SettingXY chartsPartition chartsNotes
VisibilityYesYesAuto / Show / Hide
PositionYesNoPartition charts don't pass location
StatisticsYesNoControlled by defaultLegendStats
Nested legendNoYes (>1 group)Multiple Group by dimensions required
Label truncationYesYes
WidthYesYesUI label is "Width", not "Legend size"

5. "<Chart type> examples" section

  • 2-4 real-world examples using Kibana Sample Data.
  • Use definition list format with bold example title.
  • Structure each example:
    • * Example based on: <sample data set name>
    • Configuration keys as bullet points (Slice by, Metric, Style, Legend, etc.)
    • An image of the result, sized with "=60%" or "=70%"
  • Showcase different features (e.g., basic config, donut variant, filters, multiple metrics).

Chart-page-specific formatting

For general syntax, refer to the docs-syntax-help skill. These conventions are specific to chart pages:

Images

  • Store at explore-analyze/images/<image-name>.png
  • Reference with: ![Alt text](/explore-analyze/images/<image-name>.png "=60%")
  • Sizing: "=50%" for smaller inline images, "=60%" for examples, "=70%" for settings screenshots.
  • Alt text should be descriptive, not "screenshot".

Icons

IconSyntaxUsage
Style/brush{icon}\brush``Style settings panel
Layer settings{icon}\app_management``Layer settings (9.3+/Serverless)
Actions menu{icon}\boxes_horizontal``Layer actions menu (9.0-9.2)
Add layer{icon}\plus_in_square``Add layer button

For the legend icon, use: ![Legend icon](/explore-analyze/images/kibana-legend-icon.svg "")

Cross-references

  • Other chart types: [bar charts](bar-charts.md)
  • Lens page: [**Lens**](../lens.md)
  • Lens features: [Assign colors to terms](../lens.md#assign-colors-to-terms)
  • Sample data: [sample data](/manage-data/ingest/sample-data.md)

Internal links

Link from steps to settings sections:

2. Configure the [**Slice by**](#slice-by-settings) dimension.
3. Configure the [**Metric**](#metric-settings) dimension.

Link from best practices to advanced scenarios when relevant.

Variables

Use {{kib}} (Kibana), {{es}} (Elasticsearch), {{data-source}} (data view / data source).

Checklist

  • Frontmatter has navigation_title and description
  • Hero image exists and is referenced
  • "Build a chart" stepper uses standard Access Lens / Save steps
  • Prerequisites snippet included before the stepper
  • All settings verified against Kibana source code (use lens-chart-settings skill)
  • All settings from the Lens editor are documented in the Settings section
  • Shared snippets included where applicable (not duplicated)
  • Examples use Kibana Sample Data and include images
  • Internal links from steps to settings sections
  • Links from best practices to related advanced scenarios
  • lens.md updated to link to the new page

FAQ

What does the docs-lens-chart-page skill do?

Create or update a Lens chart documentation page following Elastic docs conventions. Use when writing a new chart type page (pie, bar, metric, gauge, heat map, etc.) or updating an existing one in explore-analyze/visualize/charts/. Relies on lens-chart-settings for verifying UI labels against source code.

How do I install docs-lens-chart-page?

Run npx skills add https://github.com/elastic/elastic-docs-skills --skill docs-lens-chart-page in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/docs-lens-chart-page/ (personal) or .claude/skills/docs-lens-chart-page/ (project).

Which AI agents can use docs-lens-chart-page?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is docs-lens-chart-page safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains docs-lens-chart-page?

It is published by elastic in elastic/elastic-docs-skills. It has 146 recorded installs.

More from elastic/elastic-docs-skills

View all →

create-skill

elastic/elastic-docs-skills

Interactively create a new Claude Code skill and add it to the elastic-docs-skills catalog. Use when the user wants to generate a new skill, scaffold a slash command, or build automation for docs tasks.

Docs & Writing168 installs

docs-skill-review

elastic/elastic-docs-skills

Review an Elastic agent skill against official documentation for accuracy, completeness, and coverage gaps. Use when a writer wants to review, audit, or validate a skill from a repository of agent skills.

Docs & Writing152 installs

docs-review-changelog

elastic/elastic-docs-skills

Validate and assess the quality of Elastic changelog YAML files against current Elastic standards. Reports schema errors, content quality issues, systematic pattern violations, type-title alignment mismatches, missing product/surface context in titles, description verb-tense issues, and overly technical content that needs user-focused rewrites. Features repository-aware area validation. Fetches canonical guidance to stay in sync. Use when checking or reviewing changelog files before merging — pairs with docs-fix-changelog to get suggested fixes.

Docs & Writing150 installs

docs-check-style

elastic/elastic-docs-skills

Check 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 & Writing149 installs

docs-flag-jargon-skill

elastic/elastic-docs-skills

Flag Elastic-internal jargon in documentation and suggest plain-language replacements. Use when the user asks to check or review docs for terms that external readers would not understand, or when a docs review runs. Do not trigger on ordinary drafting or editing.

Docs & Writing148 installs

docs-frontmatter-audit

elastic/elastic-docs-skills

Audit Elastic documentation files for frontmatter completeness and correctness. Checks products, description, and navigationtitle fields across a directory. Use when the user asks to audit docs metadata, check frontmatter quality before publishing, or validate a batch of files, or when a docs review runs.

Docs & Writing148 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs