Vega-Lite Layered Dual Axis
A layered chart with a bar mark on the left axis and a line mark on the right axis sharing the same x — the canonical 'orders + conversion-rate' executive view. Vega-Lite produces this by layering two specs and using `resolve: { scale: { y: 'independent' } }` so each layer keeps
Template details
- chart
- composed
- bar
- line
- dual-axis
- vega
- vega-lite
When to use this template
This visualization is ideal for understanding the relationship between two distinct metrics that share a common dimension, such as time or category, but operate on vastly different scales or units. It allows an analyst to quickly identify co-movement, divergences, or leading/lagging indicators between the two trends, making it easier to spot correlations or causal links and inform strategic decisions.
- Comparing two quantitative measures
- Data with a single shared temporal or categorical dimension
- Metrics having disparate units or magnitudes
- Analyzing trends over time for two related variables
- Identifying correlations between a count and a rate/percentage
- Datasets where both measures are available for each data point