Class ZoomingMouseWheel
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.ZoomingMouseWheel
- All Implemented Interfaces:
Serializable
Configuration for mouse wheel zoom.
Zooming with the mouse wheel is enabled by default in
Chart.setTimeline(Boolean) charts. In other chart types, it is
enabled if Zooming#getEnabled() is set. It can be disabled by setting
setEnabled(Boolean) option to false.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()voidsetEnabled(Boolean enabled) Enable zooming with mouse wheel.voidsetSensitivity(Number sensitivity) Adjust the sensitivity of the mouse wheel.voidDecides in what dimensions the user can zoom scrolling the wheel.
-
Constructor Details
-
ZoomingMouseWheel
public ZoomingMouseWheel()
-
-
Method Details
-
getEnabled
- See Also:
-
setEnabled
Enable zooming with mouse wheel.- Parameters:
enabled-
-
getSensitivity
- See Also:
-
setSensitivity
Adjust the sensitivity of the mouse wheel. Higher values mean the zoom changes more with each wheel turn. Lower values require more wheel turns to zoom the same amount.Sensitivity of mouse wheel or trackpad scrolling. 1 is no sensitivity, while with 2, one mouse wheel delta will zoom in 50%.
- Parameters:
sensitivity-
-
getType
- See Also:
-
setType
Decides in what dimensions the user can zoom scrolling the wheel. In charts not of typeChart.setTimeline(Boolean), if not specified here, it will inherit the type fromZooming.getType(). InChart.setTimeline(Boolean)charts, it defaults toDimension.X. Note that particularly with mouse wheel in the y direction, the zoom is affected by the defaultYAxis.getStartOnTick()andYAxis.getEndOnTick()settings. In order to respect these settings, the zoom level will adjust after the user has stopped zooming. To prevent this, consider settingYAxis.setStartOnTick(Boolean)andYAxis.setEndOnTick(Boolean)to false.- Parameters:
type-
-