Combo chart
A combo chart draws some series as bars and others as lines against the same category. Use it when the measures have different meanings — volume vs rate, count vs amount.
Category
categoryField is shared by every bar and every line.
Bar values
barFields are numeric columns drawn as bars.
Line values
lineFields are numeric columns drawn as lines.
You can use only bars, only lines, or both. At least one series should be mapped.
Chart options
- Separate axis for line values (
dualAxis) — default on. Turn this on when the line is a percentage or a much smaller scale than the bars. Turn it off when both sides are the same unit. - Smooth lines — optional interpolation.
- Show legend — default on.
Example query
SELECT
date_trunc('month', created_at) AS month,
COUNT(*) AS orders,
AVG(amount) AS average_order
FROM orders
WHERE account_id = :customer_id
GROUP BY 1
ORDER BY 1
Map Category to month, Bar values to orders, and Line values to average_order, and keep the dual axis on.