Candlestick chart

Use a candlestick chart to compare open, close, low, and high metrics across an ordered category.

Candlestick legends support position and an optional legendTitle. Per-item legendItems overrides are not supported because the renderer exposes one visual-title series rather than independently named metric aliases.

Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.

Candles use the four authored metrics in query order as open, close, low, and high. Set presentation.gainColor and presentation.lossColor to a supported color intent when the theme defaults are not appropriate. Omitted colors resolve to theme success and danger; equal open/close values always use the theme's neutral/muted color, preserving a truthful flat-candle cue in both light and dark themes and exports. Source row identities remain attached to each candle. Candle data labels and labelPosition are not supported; use the ordered dimension and tooltip to identify each OHLC row.

Market OHLC

Use true open, close, low, and high metrics over an ordered month dimension. Each candle now represents the analytical contract directly rather than repurposing an unrelated distribution.

Key fields
visuals:
  market_candlestick:
    title: Monthly market range
    description: Shows monthly open, close, low, and high values.
    type: candlestick
    query:
      type: aggregate
      dimensions:
      - month
      metrics:
      - market_open
      - market_close
      - market_low
      - market_high
      sort:
      - field: month
        direction: asc
      limit: 12
    presentation:
      type: cartesian
      gainColor: data_2
      lossColor: warning

Revenue range

Change the metric to revenue and enable presentation.dataZoom so dense monthly ranges remain explorable without changing the OHLC contract.

Key fields
visuals:
  revenue_candlestick:
    title: Revenue OHLC by month
    type: candlestick
    presentation:
      type: cartesian
      dataZoom: true
    query:
      type: aggregate
      dimensions:
      - purchase_month
      metrics:
      - revenue_q1
      - revenue_q3
      - revenue_min
      - revenue_max
      sort:
      - field: purchase_month
        direction: asc
      limit: 30

API reference

Kind: chart. Renderer: echarts. Supported result shapes: ohlc.

FieldTypeDefaultAllowed valuesDescription
query.dimensionsfield mappingGroups query results and supplies category or hierarchy labels.
query.limitintegerno limitpositive integerCaps the number of rows returned to the renderer.
query.metricsmetric mappingSelects governed semantic metrics consumed by the visual shape.
query.sortsort listOrders query results by a returned field or metric alias.
presentation.dataZoombooleanfalsetrue falseAdds bounded 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.