Combo chart

Use a combo chart when related metrics need different visual encodings.

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

Multiple metrics

Select multiple query.metrics to render related values against the same category axis. The combo shape assigns each metric its own series; this reference explicitly hides direct labels so the line remains readable against the columns.

Key fields
visuals:
  revenue_orders_combo:
    title: Revenue and orders by month
    description: Compares monthly revenue and order volume together.
    type: combo
    presentation:
      type: cartesian
      series:
      - field: revenue
        mark: line
        axis: primary
      - field: order_count
        mark: column
        axis: secondary
      labels:
        density: hidden
        priority: []
        maxCharacters: 24
        minimumSpacing: 0
        tooltipFallback: true
    query:
      type: aggregate
      dimensions:
      - purchase_month
      metrics:
      - revenue
      - order_count
      sort:
      - field: purchase_month
        direction: asc
      limit: 30

Per-series renderers

Use typed presentation.series entries to render review score as a line and delivery days as columns while retaining one shared status category axis and independent value axes.

Key fields
visuals:
  review_delivery_combo:
    title: Review and delivery by status
    type: combo
    presentation:
      type: cartesian
      series:
      - field: review_score
        mark: line
        axis: primary
      - field: delivery_days
        mark: column
        axis: secondary
      labels:
        density: hidden
        priority: []
        maxCharacters: 24
        minimumSpacing: 0
        tooltipFallback: true
    query:
      type: aggregate
      dimensions:
      - status
      metrics:
      - review_score
      - delivery_days
      sort:
      - field: status
        direction: asc

Dual axes

Assign a series to the secondary axis when metrics use different scales, and declare each line or column mark explicitly.

Key fields
visuals:
  revenue_orders_dual_axis_combo:
    title: Revenue and orders dual-axis combo
    type: combo
    presentation:
      type: cartesian
      series:
      - field: revenue
        mark: column
        axis: primary
      - field: order_count
        mark: line
        axis: secondary
      labels:
        density: hidden
        priority: []
        maxCharacters: 24
        minimumSpacing: 0
        tooltipFallback: true
    query:
      type: aggregate
      dimensions:
      - purchase_month
      metrics:
      - revenue
      - order_count
      sort:
      - field: purchase_month
        direction: asc
      limit: 60

API reference

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

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.labelslabel policyhiddenhidden automatic dense alwaysControls deterministic label density, priority, truncation, and tooltip fallback.
presentation.seriesclosed combo series listnoneline area bar columnBinds each compiled metric result field to one supported mark and the primary or secondary value axis.

Accessibility. Use a descriptive title and unit, and do not rely on color alone to distinguish series or values.