Candlestick chart
Use a candlestick chart to compare open, close, low, and high measures across an ordered category.
Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.
Delivery range
Use the ohlc shape with an ordered month dimension and a numeric measure to summarize each period as open, high, low, and close values.
Key fields
visuals:
delivery_candlestick:
title: Delivery day candlestick by month
type: candlestick
query:
dimensions:
purchase_month: orders.purchase_month
measures:
delivery_days_q1: null
delivery_days_q3: null
delivery_days_min: null
delivery_days_max: null
sort:
- field: purchase_month
direction: asc
limit: 30
Revenue range
Change the measure to revenue and enable presentation.data_zoom so dense monthly ranges remain explorable without changing the OHLC contract.
Key fields
visuals:
revenue_candlestick:
title: Revenue OHLC by month
type: candlestick
presentation:
data_zoom: true
query:
dimensions:
purchase_month: orders.purchase_month
measures:
revenue_q1: null
revenue_q3: null
revenue_min: null
revenue_max: null
sort:
- field: purchase_month
direction: asc
limit: 30
API reference
Kind: chart. Renderer: echarts. Supported result shapes: ohlc.
| 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.sort | sort list | — | — | Orders query results by a returned field or measure alias. |
presentation.data_zoom | boolean | false | true false | Adds inside and slider zoom controls to supported Cartesian charts. |
Accessibility. Use a descriptive title and unit, and do not rely on color alone to distinguish series or values.