Interface Interactioner

  • All Known Implementing Classes:
    AbstractInteractioner, DefaultInteractionMode

    public interface Interactioner
    Interface to be implemented to create a custom interaction mode where you can decide how and which elements will be managed interacting with chart events and tooltips.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • isValid

        static boolean isValid​(Interactioner interactioner)
        Returns true if interactioner passed as argument is not null and its mode is not null as well.
        Parameters:
        interactioner - interactioner to be checked
        Returns:
        true if interactioner passed as argument is not null and its mode is not null
      • getMode

        IsInteractionMode getMode()
        Returns the name of interaction mode which must be used in chart options.
        Returns:
        the name of interaction mode
      • invoke

        List<InteractionItem> invoke​(IsChart chart,
                                     ChartEventContext event,
                                     InteractionOptions options,
                                     boolean useFinalPosition)
        Returns items which must be managed by CHART.JS event or hovering handler and by tooltips.
        Parameters:
        chart - the chart we are returning items from
        event - the event we are find things at
        options - options to use
        useFinalPosition - use final element position (animation target)
        Returns:
        items that are found