ZoomPanBehavior class
Customizes the zooming options.
Customize the various zooming actions such as tap zooming, selection
zooming, zoom pinch. In selection zooming, you can long-press and drag to
select a range on the chart to be zoomed in and also you can customize the
selection zooming rectangle using selectionRectBorderWidth
,
selectionRectBorderColor
and selectionRectColor
properties.
Pinch zooming can be performed by moving two fingers over the chart.
Default mode is ZoomMode.xy. Zooming will be stopped after reaching
maximumZoomLevel
.
Note: This is only applicable for SfCartesianChart
.
Constructors
- ZoomPanBehavior({bool enablePinching = false, bool enableDoubleTapZooming = false, bool enablePanning = false, bool enableSelectionZooming = false, bool enableMouseWheelZooming = false, ZoomMode zoomMode = ZoomMode.xy, double maximumZoomLevel = 0.01, double selectionRectBorderWidth = 1, Color? selectionRectBorderColor, Color? selectionRectColor})
- Creating an argument constructor of ZoomPanBehavior class.
Properties
- enableDoubleTapZooming → bool
-
Enables or disables the double tap zooming.
final
- enableMouseWheelZooming → bool
-
Enables or disables the mouseWheelZooming.
final
- enablePanning → bool
-
Enables or disables the panning.
final
- enablePinching → bool
-
Enables or disables the pinch zooming.
final
- enableSelectionZooming → bool
-
Enables or disables the selection zooming.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- maximumZoomLevel → double
-
Maximum zoom level.
final
- parentBox ↔ RenderBox?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionRectBorderColor → Color?
-
Border color of the selection zooming rectangle.
final
- selectionRectBorderWidth → double
-
Border width of the selection zooming rectangle.
final
- selectionRectColor → Color?
-
Color of the selection zooming rectangle.
final
- zoomMode → ZoomMode
-
By default, both the x and y-axes in the chart can be zoomed.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
panToDirection(
String direction) → void - Pans the plot area for given left, right, top, and bottom directions.
-
reset(
) → void - Returns the plot area back to its original position after zooming.
-
toString(
) → String -
A string representation of this object.
inherited
-
zoomByFactor(
double zoomFactor) → void - Changes the zoom level using zoom factor.
-
zoomByRect(
Rect rect) → void - Zooms the chart for a given rectangle value.
-
zoomIn(
) → void - Increases the magnification of the plot area.
-
zoomOut(
) → void - Decreases the magnification of the plot area.
-
zoomToSingleAxis(
ChartAxis axis, double zoomPosition, double zoomFactor) → void - Change the zoom level of an appropriate axis.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override