Class NativeInteraction

  • All Implemented Interfaces:
    IsJSType

    @JsType(isNative=true,
            name="Function",
            namespace="<global>")
    public final class NativeInteraction
    extends Object
    implements IsJSType
    Enables the capability to create custom interaction directly in java script language.
    This could be helpful when for performance reason, you don't want to wraps all objects.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • create

        @JsOverlay
        public static NativeInteraction create​(String code)
        Creates a custom interaction in java script.
        Parameters:
        code - the code of the custom interaction to execute
        Returns:
        a custom interaction in java script
      • call

        @JsOverlay
        public ArrayObject call​(Chart chart,
                                NativeObject event,
                                NativeObject options,
                                boolean useFinalPosition)
        Method of function to be called to invoke a custom interactioner.
        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
      • toSource

        @JsMethod(name="toString")
        public String toSource()
        Returns a string representing the source code of the function.
        Returns:
        a string representing the source code of the function