Skip to content
+

Zoom & Pan 🚧

Enables zooming and panning on specific charts or axis.

Zooming is possible on the Pro versions of the charts: <LineChartPro />, <BarChartPro />, <ScatterChartPro />.

Basic usage

To enable zooming and panning, set the zoom prop to true on the chart component.

Enabling zoom will enable all the interactions, which are made to be as intuitive as possible.

The following actions are supported:

  • Scroll: Zoom in/out by scrolling the mouse wheel.
  • Drag: Pan the chart by dragging the mouse.
  • Pinch: Zoom in/out by pinching the chart.
0501001502002503003504000100200300400500
Press Enter to start editing
0123456789101112131415161718192021220100200300400500
Press Enter to start editing
0123456789101112131415161718192021220100200300400500
Press Enter to start editing