Enum InteractionMode

  • All Implemented Interfaces:
    Serializable, Comparable<InteractionMode>, Key

    public enum InteractionMode
    extends Enum<InteractionMode>
    implements Key
    When configuring interaction with the graph via hover or tooltips, a number of different modes are available to set which elements appear via tooltip or hover.
    Author:
    Andrea "Stock" Stocchero
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DATASET
      Finds items in the same dataset.
      INDEX
      Finds item at the same index.
      NEAREST
      Gets the item that is nearest to the point.
      The nearest item is determined based on the distance to the center of the chart item (point, bar).
      If 2 or more items are at the same distance, the one with the smallest area is used.
      POINT
      Finds all of the items that intersect the point.
      X
      Returns all items that would intersect based on the X coordinate of the position only.
      Note that this only applies to cartesian charts
      Y
      Returns all items that would intersect based on the Y coordinate of the position.
      Note that this only applies to cartesian charts.
    • Enum Constant Detail

      • POINT

        public static final InteractionMode POINT
        Finds all of the items that intersect the point.
      • NEAREST

        public static final InteractionMode NEAREST
        Gets the item that is nearest to the point.
        The nearest item is determined based on the distance to the center of the chart item (point, bar).
        If 2 or more items are at the same distance, the one with the smallest area is used.
      • INDEX

        public static final InteractionMode INDEX
        Finds item at the same index. If the intersect setting is true, the first intersecting item is used to determine the index in the data.
        If intersect false the nearest item, in the x direction, is used to determine the index.
      • DATASET

        public static final InteractionMode DATASET
        Finds items in the same dataset. If the intersect setting is true, the first intersecting item is used to determine the index in the data.
        If intersect false the nearest item is used to determine the index.
      • X

        public static final InteractionMode X
        Returns all items that would intersect based on the X coordinate of the position only.
        Note that this only applies to cartesian charts
      • Y

        public static final InteractionMode Y
        Returns all items that would intersect based on the Y coordinate of the position.
        Note that this only applies to cartesian charts.
    • Method Detail

      • values

        public static InteractionMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (InteractionMode c : InteractionMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static InteractionMode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property