Class Zooming
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.Zooming
- All Implemented Interfaces:
Serializable
Options for zooming configuration. This enables zooming in on plots and
provides options for controlling zoom behavior including mouse wheel support.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey()getType()voidSet a key to hold when dragging to zoom the chart.voidsetMouseWheel(ZoomingMouseWheel mouseWheel) Configuration for mouse wheel zoom.voidsetPinchType(Dimension pinchType) Equivalent to type, but for pinch gestures.voidsetResetButton(ZoomingResetButton resetButton) The button that appears after a selection zoom, allowing the user to reset zoom.voidsetSingleTouch(Boolean singleTouch) Enables zooming by a single touch, in combination withgetType().voidDecides in what dimensions the user can zoom by dragging the mouse.
-
Constructor Details
-
Zooming
public Zooming()
-
-
Method Details
-
getKey
- See Also:
-
setKey
Set a key to hold when dragging to zoom the chart. This is useful to avoid zooming while moving points. Should be set different thanChartModel.getPanKey().- Parameters:
key-
-
getMouseWheel
- See Also:
-
setMouseWheel
Configuration for mouse wheel zoom.- Parameters:
mouseWheel-
-
getPinchType
- See Also:
-
setPinchType
Equivalent to type, but for pinch gestures. By default, the pinchType is the same as thegetType()setting.- Parameters:
pinchType-
-
getResetButton
- See Also:
-
setResetButton
The button that appears after a selection zoom, allowing the user to reset zoom.- Parameters:
resetButton-
-
getSingleTouch
- See Also:
-
setSingleTouch
Enables zooming by a single touch, in combination withgetType(). When enabled, two-finger pinch will still work as set up bygetPinchType(). However, single-touch will interfere with touch-dragging the chart to read the tooltip. And especially when vertical zooming is enabled, it will make it hard to scroll vertically on the page.- Parameters:
singleTouch-
-
getType
- See Also:
-
setType
Decides in what dimensions the user can zoom by dragging the mouse. Note: For non-cartesian series, the only supported zooming type isDimension.XY, as zooming in a single direction is not applicable due to the radial nature of the coordinate system.- Parameters:
type-
-