> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cube.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Charts

> Visualize query results as charts, tables, KPIs, and maps directly inside Cube workbooks.

Every tab in a Cube workbook has a chart panel. Once your query returns results, switch to the chart panel to pick a visualization type and configure how the data is displayed — from a simple bar chart to a composable KPI tile or a fully custom Vega-Lite spec.

## Chart types

Cube has built-in support for bar, line, area, pie, scatter, heatmap, KPI, map, boxplot, and more. See the [chart types overview](https://docs.cube.dev/docs/explore-analyze/charts/chart-types) for a full list and guidance on which type fits which data shape.

### Selecting a chart type

Chart type icons at the top of the chart panel let you quickly switch between common layouts — grouped vs. stacked bars, line vs. area, table vs. chart view — without opening the full configuration panel.

[Smart data visualization selector in Cube](https://www.youtube-nocookie.com/embed/ORgDS9zbSuk)

When you run a query on a new tab, Cube shows the chart type picker rather than picking for you. It outlines the type that best fits your query and labels it **Recommended** — see [Recommended chart type](https://docs.cube.dev/docs/explore-analyze/charts/chart-types#recommended-chart-type) — but choosing one is always your action. Any manual configuration you apply is preserved when you change query fields.

### Resetting chart settings

Sections of the configuration panel — fields, series, pivot, column widths — each carry their own **Reset** control, which clears that section back to its defaults. Resetting does not change the chart type you picked.

## Generate charts with AI

Describe the visualization you want in plain language — for example, *"show this as a stacked bar grouped by status"* — and the AI agent will build and configure it. You can also let the agent auto-suggest the best chart for your query results. This is a separate mechanism from the **Recommended** outline in the chart type picker: the agent writes a Vega-Lite spec and applies it, while the recommendation only marks a built-in type for you to pick.

Charts generated by the AI are written as [Vega-Lite v5](https://vega.github.io/vega-lite/) specs and can be further edited in the [custom visualization](https://docs.cube.dev/docs/explore-analyze/charts/custom.md) spec editor.

## Configure charts

Adjust the appearance of any chart through the configuration panel:

* **[Color and stacking](https://docs.cube.dev/docs/explore-analyze/charts/configuration/color-and-stacking.md)** — Color palettes, series coloring, and stacking behavior
* **[Series configuration](https://docs.cube.dev/docs/explore-analyze/charts/configuration/series-configuration.md)** — Per-series mark type, color, and display options
* **[Series mapping](https://docs.cube.dev/docs/explore-analyze/charts/configuration/series-mapping.md)** — Assign query fields to chart channels (X, Y, color, size)
* **[Axes](https://docs.cube.dev/docs/explore-analyze/charts/configuration/axes.md)** — Axis titles, grid lines, scale, reference lines, and reference bands
* **[Tooltips](https://docs.cube.dev/docs/explore-analyze/charts/configuration/tooltips.md)** — Fields shown on hover
* **[Data labels](https://docs.cube.dev/docs/explore-analyze/charts/configuration/data-labels.md)** — Values displayed directly on chart marks

## Custom visualizations

When the built-in chart types don't cover your use case, write a raw [Vega-Lite spec](https://docs.cube.dev/docs/explore-analyze/charts/custom.md) or use an HTML template with Handlebars. Both options give you complete control over the rendered output.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.