com.vaadin.flow.component.charts.events.internal.
Class AxisRescaledEvent
All Implemented Interfaces:
Event for information about rescaling the axis. Wraps
Axis.setExtremes()
.
Since:
2.0
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAxisRescaledEvent
(int axis, int axisIndex, Number minimum, Number maximum) Constructs the event with animated transition, redraws the chart.
AxisRescaledEvent
(int axis, int axisIndex, Number minimum, Number maximum, boolean redraw) Constructs the event with animated transition.
AxisRescaledEvent
(int axis, int axisIndex, Number minimum, Number maximum, boolean redraw, boolean animate) Constructs the event.
-
Method Summary
Modifier and TypeMethodDescriptionint
getAxis()
Returns a number indicating axis dimension (X, Y, ...).
int
Returns the axis the event is about.
Returns the new maximum value on the axis.
Returns the new minimum value on the axis.
boolean
Checks whether or not animate the resizing.
boolean
Checks whether or not to redraw the chart.
-
Constructor Details
-
AxisRescaledEvent
public AxisRescaledEvent(int axis, int axisIndex, Number minimum, Number maximum, boolean redraw, boolean animate) Constructs the event.
Parameters:
axis
- Number depicting the dimension of the axis. 0 is X, 1 is Y, etc.axisIndex
- Index of the axis.minimum
- Minimum value on the axis.maximum
- Maximum value on the axis.redraw
- Whether or not to redraw the chart.animate
- Whether or not to animate the rescaling. -
AxisRescaledEvent
Constructs the event with animated transition.
Parameters:
axis
- Number depicting the dimension of the axis. 0 is X, 1 is Y, etc.axisIndex
- The axis that was resized.minimum
- Minimum value on the axis.maximum
- Maximum value on the axis.redraw
- Whether or not to redraw the chart. -
AxisRescaledEvent
Constructs the event with animated transition, redraws the chart.
Parameters:
axis
- Number depicting the dimension of the axis. 0 is X, 1 is Y, etc.axisIndex
- The axis that was resized.minimum
- Minimum value on the axis.maximum
- Maximum value on the axis.
-
-
Method Details
-
getMinimum
Returns the new minimum value on the axis.
Returns:
The new minimum value on the axis.
-
getMaximum
Returns the new maximum value on the axis.
Returns:
The new maximum value on the axis.
-
isRedrawingNeeded
public boolean isRedrawingNeeded()Checks whether or not to redraw the chart.
Returns:
true when chart needs to be redrawn, false otherwise.
-
isAnimated
public boolean isAnimated()Checks whether or not animate the resizing.
Returns:
true when redrawing should be animated, false otherwise.
-
getAxisIndex
public int getAxisIndex()Returns the axis the event is about.
Returns:
The axis that was rescaled.
-
getAxis
public int getAxis()Returns a number indicating axis dimension (X, Y, ...).
Returns:
Axis dimension.
-