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

# VISUALIZE

> Choose the chart and the metrics it plots.

`VISUALIZE` turns the results into a chart. Name the metrics to plot, then `TYPE` and a chart type. Without a `VISUALIZE` line the report is a table.

```sql theme={null}
FROM sales
  SHOW net_sales
  GROUP BY product_vendor
  ORDER BY net_sales DESC
  VISUALIZE net_sales TYPE horizontal_bar
```

Leave out `TYPE` and Queryful picks the chart that suits the results, changing it as you change the query. That's **Recommended** in the Visualization picker.

## Chart types

| Type | Shows |
| - | - |
| `table` | The table on its own |
| `line` | One or more metrics as lines over time |
| `stacked_area` | Metrics over time, stacked to show how they add up |
| `bar` | A vertical bar for each value |
| `grouped_bar` | Bars side by side for each value of the first dimension, one per value of the second |
| `stacked_bar` | Bars split into segments by the second dimension |
| `horizontal_bar` | A horizontal bar for each value, for longer names |
| `horizontal_grouped_bar` | Horizontal bars side by side |
| `stacked_horizontal_bar` | Horizontal bars split into segments |
| `single_stacked_bar` | One bar split into each value's share |
| `donut` | Each value as a slice of a ring |
| `single_metric` | One number, large |
| `list` | A list of values ranked by a metric |
| `list_with_dimension_values` | A list of the dimension's values |
| `combo` | Bars and a line together, for two metrics on different scales |
| `heatmap` | A grid across two dimensions, shaded by the metric |
| `calendar_heatmap` | A calendar with each day shaded by the metric |
| `histogram` | How many results fall in each range of values |
| `funnel` | Step by step drop-off through a process |
| `waterfall` | How a starting value rises and falls to an end value |
| `treemap` | Nested rectangles sized by value |
| `sunburst` | Rings showing each level's share |
| `radar` | Values on axes around a circle |
| `scatter_plot` | Each result as a point on two metrics |
| `bubble_chart` | A scatter plot with a third metric as the bubble size |
| `rfm_grid` | Customers by how recently, how often and how much they buy |

Bar charts plot one metric. For several metrics over time, use `line` or `stacked_area`.

## Bars and a line

Give each metric its own type to draw one as bars and the other as a line:

```sql theme={null}
FROM sales
  SHOW net_sales, orders
  TIMESERIES week
  DURING last_quarter
  VISUALIZE net_sales TYPE bar, orders TYPE line
```

## Capping the chart

`MAX` after the type caps how many items the chart plots. The table still shows every row.

```sql theme={null}
FROM sales
  SHOW net_sales
  GROUP BY product_title
  ORDER BY net_sales DESC
  VISUALIZE net_sales TYPE horizontal_bar MAX 10
```


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