> ## Documentation Index
> Fetch the complete documentation index at: https://cubed3-igor-cub-3820-document-chart-type-recommendation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Chart types

> Overview of all built-in chart types available in Cube workbooks.

Cube includes a library of built-in chart types covering the most common visualization patterns. Each type is designed for specific data shapes — choose the one that best fits your query structure and the question you're answering.

* [Bar](/docs/explore-analyze/charts/chart-types/bar)
* [Line](/docs/explore-analyze/charts/chart-types/line)
* [Area](/docs/explore-analyze/charts/chart-types/area)
* [Scatter](/docs/explore-analyze/charts/chart-types/scatter)
* [Pie & donut](/docs/explore-analyze/charts/chart-types/pie)
* [Heatmap](/docs/explore-analyze/charts/chart-types/heatmap)
* [Boxplot](/docs/explore-analyze/charts/chart-types/boxplot)
* [Table](/docs/explore-analyze/charts/chart-types/table)
* [KPI](/docs/explore-analyze/charts/chart-types/kpi)
* [Map](/docs/explore-analyze/charts/chart-types/map)
* [HTML](/docs/explore-analyze/charts/chart-types/html)

For configuration options that apply across chart types — axes, color, series settings, tooltips — see [Configure charts](/docs/explore-analyze/charts/configuration).

## Recommended chart type

When your query returns a result, Cube outlines the one chart type that best fits it and labels it
**Recommended**. It is a suggestion: every other available type stays selectable, and the outline
disappears once you pick a type yourself.

Cube never applies a chart type for you. The recommendation is always only outlined, wherever the
picker appears, and choosing a type is always your action.

### What Cube looks at

The recommendation reads the shape of your query and its result: how many measures, dimensions and
time dimensions you selected, how many distinct values each dimension has, and how long the
category labels are. Nothing is sent anywhere and nothing is saved — the suggestion lasts for the
current session only.

Where a threshold is involved, it comes from
[Draco](https://ieeexplore.ieee.org/document/8440847) (Moritz et al., *Formalizing Visualization
Design Knowledge as Constraints*, IEEE VIS 2018), which encodes established visualization research
as rules: a category axis becomes crowded past 12 values, a color or stacking channel saturates
past 10 series, and no axis reads past 30 values.

One number is Cube's own rather than Draco's, and is tuned by us: a mean label length of **16
characters** counts as long.

The number of rows in the result is deliberately not a condition. It follows from the granularity
you chose rather than from the shape of the query, so counting it would recommend a different chart
for the same measure over the same time dimension simply because you switched from years to days.

### The conditions

Cube checks these in order and takes the first that matches.

| Recommendation     | When                                                                                                  |
| ------------------ | ----------------------------------------------------------------------------------------------------- |
| **Map**            | The query contains latitude and longitude                                                             |
| **KPI**            | One measure, no dimensions, and a single row                                                          |
| **Line**           | A measure over a time dimension, optionally split by one category of up to 10 values                  |
| **Scatter**        | Two or more measures with no time dimension — the shape for correlating them                          |
| **Stacked bar**    | One measure split by two categories, the first up to 12 values and the second up to 10                |
| **Heatmap**        | One measure split by two larger categories that fill enough of the grid to be worth drawing           |
| **Bar**            | One measure across a few categories with short labels                                                 |
| **Horizontal bar** | The same, where the labels are long or the categories too many for a vertical axis                    |
| **Table**          | The query has no measure, two time dimensions, three or more dimensions, or a category past 30 values |

Pie is not recommended. Its shape — one measure across a few categories — is the same one Bar
answers, and a bar chart compares those values more accurately, so Cube recommends Bar and leaves
Pie to you. It remains available in the picker like any other chart type.

Table's conditions are disqualifiers rather than a last preference: a query that meets any of them
has no chart encoding that reads well, so the table is the honest answer. Maps are the exception —
a map has no category axis to crowd, so a large number of plotted places is normal rather than
unreadable.

### When nothing is recommended

Cube suppresses the recommendation rather than guessing. You will see no outline when:

* no rule matches the query cleanly;
* a value it needs is still unknown, such as the number of distinct values in a dimension;
* the result was truncated by a row limit, so the counts it would read are incomplete;
* you have already picked a type by hand in the picker you are looking at.

The chart type you have applied is not one of these cases: when the best fit is the type already on
screen, Cube still marks it, confirming the choice rather than leaving the picker silent.
