Class InteractionOptions

    • Constructor Detail

      • InteractionOptions

        public InteractionOptions()
        Creates an interaction item with defaults.
      • InteractionOptions

        public InteractionOptions​(IsInteractionMode mode)
        Creates an interaction item with passed mode and all other configuration as defaults.
        Parameters:
        mode - how the event will be apply on elements
      • InteractionOptions

        public InteractionOptions​(IsInteractionMode mode,
                                  boolean intersect)
        Creates an interaction item with passed mode and intersect and all other configuration as defaults.
        Parameters:
        mode - how the event will be apply on elements
        intersect - if true, the mode only applies when the mouse position intersects an element on the chart.
      • InteractionOptions

        public InteractionOptions​(IsInteractionMode mode,
                                  boolean intersect,
                                  InteractionAxis axis)
        Creates an interaction item with all passed arguments.
        Parameters:
        mode - how to interact with the elements on charts.
        intersect - if true, the mode only applies when the mouse position intersects an element on the chart.
        axis - which directions are used in calculating distances.
      • InteractionOptions

        public InteractionOptions​(InteractionEnvelop<NativeObject> envelop)
        Creates the object with envelop envelop with the native object instance to be wrapped.
        Parameters:
        envelop - envelop with the native object instance to be wrapped.
    • Method Detail

      • setAxis

        public void setAxis​(InteractionAxis axis)
        Sets which directions are used in calculating distances.
        Parameters:
        axis - define which directions are used in calculating distances.
      • getAxis

        public InteractionAxis getAxis()
        Returns which directions are used in calculating distances.
        Specified by:
        getAxis in interface IsDefaultInteraction
        Returns:
        define which directions are used in calculating distances.
      • setIncludeInvisible

        public void setIncludeInvisible​(boolean includeInvisible)
        If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
        Parameters:
        includeInvisible - if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
      • isIncludeInvisible

        public boolean isIncludeInvisible()
        If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
        Specified by:
        isIncludeInvisible in interface IsDefaultInteraction
        Returns:
        if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
      • setMode

        public void setMode​(IsInteractionMode mode)
        Sets which elements appear in the interaction.
        Parameters:
        mode - which elements appear in the interaction.
      • setMode

        public void setMode​(String name)
        Sets which elements appear in the interaction.
        Parameters:
        name - which elements appear in the interaction.
      • setIntersect

        public void setIntersect​(boolean intersect)
        if true, the mode only applies when the mouse position intersects an item on the chart.
        Parameters:
        intersect - if true, the mode only applies when the mouse position intersects an item on the chart.
      • isIntersect

        public boolean isIntersect()
        if true, the mode only applies when the mouse position intersects an item on the chart.
        Specified by:
        isIntersect in interface IsDefaultInteraction
        Returns:
        if true, the mode only applies when the mouse position intersects an item on the chart.
      • nativeObject

        public NativeObject nativeObject()
        Returns the native object instance.
        Returns:
        the native object instance.