Chart Composition

Wrap your data definitions in a chart container, then stack plot, axis, and interaction components as children.

Explicit chart_type on each SeriesDef tells plot layers which geometry to render; child order controls z-order (bars beneath lines, annotations on top).

Build mixed-type dashboards by placing explicit plot children inside ChartContainer. Each SeriesDef must declare chart_type; child order controls z-order.

  • Place ChartContainer at the root with series, axes, and optional dataset binding.
  • Add plot children (BarPlot, LinePlot, …) with required chart_type on each series.
  • Wrap plots in PlotClip when marks extend past plot bounds.
  • Add ChartCustomBaseline or custom SVG using scale hooks for annotations.
Mixed bar and line chart

Revenue bars with a target line overlay, clipped to the plot area. Demonstrates z-order, mixed chart_type series, and PlotClip for overflow control.

200k400k600kAmount (USD)JanFebMarAprMayJunMonth
Custom SVG layer via hooks

Dashed revenue baseline using use_drawing_area and use_y_scale. Use when annotations must stay aligned to data coordinates on resize.

200k400k600kAmount (USD)Q1Q2Q3Q4Quarter