Multi-Pane Charts
A multi-pane chart stacks several panes vertically inside one chart frame. Each pane has its own price scale, but they share the time axis along the bottom. Use panes when two series have incompatible value ranges (e.g. price in dollars vs. RSI in 0-100) or when you want to separate price action from indicators.
The pane that a series lives in is set per series via the pane argument on every per-type constructor (or on the convenience chart functions like tvl.line(), tvl.histogram()). Per-chart options control how panes stretch, whether they survive when emptied, and what the separator between them looks like.
What are multi-pane charts useful for?
- Mixing scales: Price in dollars and RSI in [0, 100] don’t fit on one axis. Stack them so each gets its own price scale without clobbering the other.
- Decluttering: An indicator like MACD becomes unreadable when crammed into the price pane. A dedicated pane gives it room.
- Layered context: Volume below price is a near-universal trading convention; panes encode this convention directly.
- Stable layouts on ticking data:
pane_preserve_emptykeeps a pane visible even when its data hasn’t arrived yet, so your dashboard layout doesn’t jump around.
Examples
Stack price and volume into two panes
This is the canonical pattern: price on top, volume on the bottom, sharing a time scale. Pass pane=0 (the default) for the upper pane and pane=1 for the lower.
The two panes share the time axis but have independent price scales. The volume pane scales to its own min/max automatically.
Add a third pane for an indicator
You aren’t limited to two panes. Add as many as you need; each pane=N introduces a new pane below the previous one.
The three panes stack top-to-bottom in the same order as their pane indices.
Customize height ratios
pane_stretch_factors is a list of weights (one per pane) that controls how vertical space is distributed. Default is equal weighting; bumping the price pane’s factor gives it more room.
A [3, 1] ratio makes the price pane three times as tall as the volume pane, regardless of the chart’s outer height.
Preserve a pane when it’s empty
pane_preserve_empty is a list of booleans (one per pane) controlling whether a pane remains visible when its data is empty (no rows yet, or filtered away). Useful when a downstream table hasn’t ticked yet but the layout should still allocate space.
Without pane_preserve_empty=[..., True], an empty pane collapses and the chart auto-resizes; with it, the layout is stable while you wait for the data.
Style the pane separator
The thin bar between panes is styled by pane_separator_color, pane_separator_hover_color, and pane_enable_resize.
When pane_enable_resize=True (the default), the user can drag the separator to rebalance the panes; setting it to False locks the ratio at whatever pane_stretch_factors produced.
API Reference
The chart entry point is tvl.chart(). The pane-related options it accepts are pane_stretch_factors, pane_preserve_empty, pane_separator_color, pane_separator_hover_color, and pane_enable_resize. Series factories all accept a pane keyword.
For the full tvl.chart signature, see the Chart container page.