Charts Zoom Pan

Zoom and pan let users focus on part of a dense chart — scroll to zoom, drag to pan, pinch on touch devices.

Turn it on per axis with ZoomConfig, constrain span with min_span, and optionally sync companion axes with filter_mode when the vertical axis should follow the visible horizontal range.

  • Long time series where the default view is too dense to read.
  • Exploration dashboards where users drill into a date range before taking action.
  • Line and bar charts with ChartFeatures::ZOOM_PAN enabled on the chart root.
  • Set zoom config on the axis definition (enabled: true, optional min_span).
  • Enable features=ChartFeatures::ZOOM_PAN on the chart component.
  • Hold zoom state in an RwSignal<Vec<ZoomWindow>> for controlled mode and reset buttons.
  • Wire on_zoom_change when parent state must persist across re-renders.
Zoom and pan on line and bar charts

Scroll wheel zooms the monthly x-axis; drag pans; Reset restores the full domain. Controlled zoom signal is shared between line and bar so both stay in sync.

M01M02M03M04M05M06M07M08M09M10M11M12M13M14M15M16M17M18M19M20M21M22M23M24Month
M01M02M03M04M05M06M07M08M09M10M11M12M13M14M15M16M17M18M19M20M21M22M23M24Month