Class ChartEventContext

  • All Implemented Interfaces:
    IsPoint

    public final class ChartEventContext
    extends NativeObjectContainer
    implements IsPoint
    This is the class which can wrap a CHART.JS event.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • ChartEventContext

        public ChartEventContext​(Chart chart)
        Creates the object with the chart instance, creating a change native event.
        Parameters:
        chart - chart instance.
      • ChartEventContext

        public ChartEventContext​(Chart chart,
                                 BaseNativeEvent event)
        Creates the object with the chart instance, creating a change native event.
        Parameters:
        chart - chart instance to store in the object
        event - native event instance to store in the object
      • ChartEventContext

        public ChartEventContext​(ConfigurationEnvelop<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.
      • ChartEventContext

        public ChartEventContext​(ItemsEnvelop<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.
      • ChartEventContext

        public ChartEventContext​(AnnotationEnvelop<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.
      • ChartEventContext

        public ChartEventContext​(DataLabelsEnvelop<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

      • getNativeChart

        public Chart getNativeChart()
        Returns the CHARBA chart instance.
        Returns:
        the CHARBA chart instance
      • getChart

        public IsChart getChart()
        Returns the CHARBA chart instance.
        Returns:
        the CHARBA chart instance
      • getNativeEvent

        public BaseNativeEvent getNativeEvent()
        Returns the CHARBA chart instance.
        Returns:
        the CHARBA chart instance
      • getX

        public double getX()
        Returns the X location of event in pixel.
        Specified by:
        getX in interface IsPoint
        Returns:
        the X location of event in pixel.
      • getY

        public double getY()
        Returns the Y location of event in pixel.
        Specified by:
        getY in interface IsPoint
        Returns:
        the Y location of event in pixel.
      • getType

        public String getType()
        Returns the type of the event.
        Returns:
        the type of the event
      • getObject

        public NativeObject getObject()
        Wraps the protected method to get the java script object in order to consume it.
        Returns:
        the java script object in order to consume it.