Skip to Content

Zoom Pan

The Zoom Pan component in REAVIZ allows users to zoom in and pan across various charts. This is particularly useful for exploring large datasets, enabling users to focus on specific areas of the chart.

Where to use:

  • Large Datasets: Ideal for charts with large datasets, allowing users to zoom in on specific data points.
  • Detailed Analysis: Useful for enabling detailed analysis by zooming into specific sections of the chart.
  • Interactive Exploration: Great for interactive data exploration, providing a more dynamic user experience.

Examples

API

ChartZoomPanΒ 

NameTypeDefault
dataChartInternalDataShape[]

Data the chart is rendering. Set internally by the parent chart.

domain[ChartDataTypes, ChartDataTypes]

Current zoom domain on the axis being zoomed.

axisType"value" | "time" | "category" | "duration"

Type of the axis being zoomed. Set internally by the parent chart.

roundDomainsboolean

Whether the axis is rounding domains. Set internally by the parent chart.

heightnumber

Height of the zoom-pan area. Set internally by the parent chart.

widthnumber

Width of the zoom-pan area. Set internally by the parent chart.

scalenumber

Current zoom scale factor.

offsetnumber

Current pan offset.

pannableboolean

Whether panning is enabled.

zoomableboolean

Whether zooming is enabled.

disabledboolean

Whether the gestures are disabled.

maxZoomnumber

Maximum allowed zoom scale.

zoomStepnumber

Incremental step applied on zoom gestures.

disableMouseWheelboolean

Whether to ignore mouse wheel events for zoom.

requireZoomModifierboolean

Whether a modifier key is required to trigger zoom.

onZoomPan(event: ZoomPanChangeEvent) => void

Fires when the user zooms or pans.

ZoomPanΒ 

NameTypeDefault
heightnumber

Height of the area.

0
widthnumber

Width of the area.

0
scalenumber

Current zoom scale factor.

1
xnumber

Current x translation.

0
ynumber

Current y translation.

0
pannableboolean

Whether panning is enabled.

true
zoomableboolean

Whether zooming is enabled.

true
disabledboolean

Whether the gestures are disabled.

maxZoomnumber

Maximum allowed zoom scale.

10
minZoomnumber

Minimum allowed zoom scale.

0
zoomStepnumber

Incremental step applied on zoom gestures.

0.1
constrainboolean

Whether panning is constrained to the chart bounds.

true
globalPanningboolean

Whether panning works anywhere on the page.

true
disableMouseWheelboolean

Whether to ignore mouse wheel events for zoom.

requireZoomModifierboolean

Whether a modifier key is required to trigger zoom.

onZoomPan(event: ZoomPanEvent) => void
onZoom(event: ZoomEvent) => void
onZoomEnd() => void
onPanStart(event: PanStartEvent) => void
onPanMove(event: PanMoveEvent) => void
onPanEnd(event: PanEndEvent) => void
onPanCancel(event: PanCancelEvent) => void
Last updated on