Enum Class AxisScale

java.lang.Object
java.lang.Enum<AxisScale>
eu.webtoolkit.jwt.chart.AxisScale
All Implemented Interfaces:
Serializable, Comparable<AxisScale>, Constable

public enum AxisScale extends Enum<AxisScale>
Enumeration that indicates a scale for an axis.

The scale determines how values are mapped onto an axis.

See Also:
  • Enum Constant Details

    • Discrete

      public static final AxisScale Discrete
      A discrete scale is set as the scale for the X axis in a ChartType.Category, and is only applicable there. It lists all values, evenly spaced, and consecutively in the order of the model. The categories are converted to numbers using their ordinal (first category = 0, second = 1, ...).
    • Linear

      public static final AxisScale Linear
      A linear scale is the default scale for all axes, except for the X scale in a Discrete. It maps values in a linear fashion on the axis.
    • Log

      public static final AxisScale Log
      A logarithmic scale is useful for plotting values with of a large range, but only works for positive values.
    • Date

      public static final AxisScale Date
      A date scale is a special linear scale, which is useful for the X axis in a ChartType.Scatter, when the X series contain dates (of type WDate). The dates are converted to numbers, as Julian Days.
    • DateTime

      public static final AxisScale DateTime
      A datetime scale is a special linear scale, which is useful for the X axis in a ChartType.Scatter, when the X series contain timedates (of type WDate). The dates are converted to numbers, as the number of seconds since the Unix Epoch (midnight Coordinated Universal Time (UTC) of January 1, 1970).
  • Method Details

    • values

      public static AxisScale[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AxisScale valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Returns the numerical representation of this enum.