Column chart
Use a column chart to compare categories or ordered periods with vertical bars.
Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.
Basic
Use one ordered category and one measure for a direct vertical comparison. Ascending month order makes changes over time easy to scan.
visuals:
orders_by_month_column:
title: Orders by month
type: column
query:
dimensions:
purchase_month: orders.purchase_month
measures:
order_count: null
sort:
- field: purchase_month
direction: asc
limit: 30
Stacked series
Map status through query.series and enable presentation.stacked to show both the monthly total and each status contribution.
visuals:
orders_by_month_status:
title: Orders by month and status
description: Compares monthly order volume split by status.
type: column
presentation:
stacked: true
query:
dimensions:
purchase_month: orders.purchase_month
series:
field: orders.status
alias: status
measures:
order_count: null
sort:
- field: purchase_month
direction: asc
limit: 40
Grouped series
Keep the series unstacked to place statuses side by side, and use presentation.legend to position the series key above the plot.
visuals:
orders_by_month_status_grouped:
title: Orders by month and status grouped
type: column
presentation:
legend: bottom
query:
dimensions:
purchase_month: orders.purchase_month
series:
field: orders.status
alias: status
measures:
order_count: null
sort:
- field: purchase_month
direction: asc
limit: 60
API reference
Kind: chart. Renderer: echarts. Supported result shapes: category_series_value category_value.
| Field | Type | Default | Allowed values | Description |
|---|---|---|---|---|
query.dimensions | field mapping | — | — | Groups query results and supplies category, hierarchy, matrix, graph, or geographic labels. |
query.limit | integer | no limit | positive integer | Caps the number of rows returned to the renderer. |
query.measures | measure mapping | — | — | Selects the governed semantic measures consumed by the visual shape. |
query.series | field reference | — | — | Splits one measure into named series for compatible chart shapes. |
query.sort | sort list | — | — | Orders query results by a returned field or measure alias. |
presentation.legend | boolean | string | false | true false top bottom left right | Shows the legend and optionally selects its position. |
presentation.stacked | boolean | false | true false | Stacks compatible bar, column, line, or area series. |
Accessibility. Use a descriptive title and unit, and do not rely on color alone to distinguish series or values.