com.vaadin.flow.component.charts.events.internal.

Class AxisRescaledEvent

java.lang.Object
com.vaadin.flow.component.charts.events.internal.AxisRescaledEvent

All Implemented Interfaces:

Serializable

public class AxisRescaledEvent extends Object implements Serializable

Event for information about rescaling the axis. Wraps Axis.setExtremes().

Since:

2.0

See Also:

  • 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

      public AxisRescaledEvent(int axis, int axisIndex, Number minimum, Number maximum, boolean redraw)

      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

      public AxisRescaledEvent(int axis, int axisIndex, Number minimum, Number maximum)

      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

      public Number getMinimum()

      Returns the new minimum value on the axis.

      Returns:

      The new minimum value on the axis.

    • getMaximum

      public Number 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.