Data Zoom
DataZoom.RdAxis-range zoom component. ECharts renders dataZoom as an array; common
usage pairs a "slider" (visible scrollbar) with an "inside" (mouse-wheel
/ drag) entry targeting the same axis. Unused styling / mouse-behavior
fields stay NULL and are dropped from the serialized output.
Usage
DataZoom(
type = "slider",
id = NULL,
disabled = NULL,
x_axis_index = NULL,
y_axis_index = NULL,
radius_axis_index = NULL,
angle_axis_index = NULL,
single_axis_index = NULL,
filter_mode = NULL,
start = NULL,
end = NULL,
start_value = NULL,
end_value = NULL,
min_span = NULL,
max_span = NULL,
min_value_span = NULL,
max_value_span = NULL,
orient = NULL,
throttle = NULL,
range_mode = NULL,
show = NULL,
background_color = NULL,
left = NULL,
right = NULL,
top = NULL,
bottom = NULL,
width = NULL,
height = NULL,
zoom_lock = NULL,
zoom_on_mouse_wheel = NULL,
move_on_mouse_move = NULL,
move_on_mouse_wheel = NULL,
prevent_default_mouse_move = NULL
)Arguments
- type
Character {"slider", "inside"}: Zoom type.
"slider"shows a draggable handle;"inside"enables zoom/drag directly on the coordinate system.- id
Optional Character: Component identifier used for updates.
- disabled
Optional Logical: Whether the component is disabled.
- x_axis_index
Optional Numeric, numeric vector, or Character {"all"}: Index of the x-axis (or axes) this zoom targets.
- y_axis_index
Optional Numeric, numeric vector, or Character {"all"}: Index of the y-axis (or axes) this zoom targets.
- radius_axis_index
Optional Numeric, numeric vector, or Character {"all"}: Polar radius axis index.
- angle_axis_index
Optional Numeric, numeric vector, or Character {"all"}: Polar angle axis index.
- single_axis_index
Optional Numeric, numeric vector, or Character {"all"}: Single-axis index.
- filter_mode
Optional Character {"filter", "weakFilter", "empty", "none"}: How out-of-window data points are handled.
- start
Optional Numeric [0, 100]: Left/start position as a percentage of the full data range.
- end
Optional Numeric [0, 100]: Right/end position as a percentage of the full data range.
- start_value
Optional Numeric, Character, or Date: Absolute start value (alternative to
start).- end_value
Optional Numeric, Character, or Date: Absolute end value (alternative to
end).- min_span
Optional Numeric [0, 100]: Minimum window size, as a percentage.
- max_span
Optional Numeric [0, 100]: Maximum window size, as a percentage.
- min_value_span
Optional Numeric or Character: Minimum window size in data units.
- max_value_span
Optional Numeric or Character: Maximum window size in data units.
- orient
Optional Character {"horizontal", "vertical"}: Layout orientation. Defaults are inferred from the axis the zoom targets.
- throttle
Optional Numeric [0, Inf): Throttle delay in milliseconds for zoom events.
- range_mode
Optional length-2 Character vector of {"value", "percent"}: Per-boundary interpretation for start/end.
- show
Optional Logical: Whether the slider is visible (slider type only).
- background_color
Optional Character: Slider background color.
- left
Optional Numeric or Character: Slider left position.
- right
Optional Numeric or Character: Slider right position.
- top
Optional Numeric or Character: Slider top position.
- bottom
Optional Numeric or Character: Slider bottom position.
- width
Optional Numeric or Character: Slider width.
- height
Optional Numeric or Character: Slider height.
- zoom_lock
Optional Logical: Whether to lock the window size (allow move but not zoom).
- zoom_on_mouse_wheel
Optional Logical or Character {"shift", "ctrl", "alt"}: Whether/how the mouse wheel zooms (inside type only).
- move_on_mouse_move
Optional Logical or Character {"shift", "ctrl", "alt"}: Whether/how mouse drag pans (inside type only).
- move_on_mouse_wheel
Optional Logical or Character {"shift", "ctrl", "alt"}: Whether/how the mouse wheel pans (inside type only).
- prevent_default_mouse_move
Optional Logical: Whether to call
event.preventDefault()on drag (inside type only).
Details
Corresponds to DataZoomOption in
src/component/dataZoom/DataZoomModel.ts (line 38),
SliderDataZoomOption in src/component/dataZoom/SliderZoomModel.ts
(line 38), and InsideDataZoomOption in
src/component/dataZoom/InsideZoomModel.ts (line 23).
ECharts docs: https://echarts.apache.org/en/option.html#dataZoom