Class Point

    • Constructor Detail

      • Point

        protected Point​(Elements elements,
                        Key childKey,
                        IsDefaultPoint defaultValues,
                        NativeObject nativeObject)
        Creates the object with the parent, the key of this element, default values and native object to map java script properties.
        Parameters:
        elements - parent node to use to add this element where changed
        childKey - the property name of this element to use to add it to the parent.
        defaultValues - default provider
        nativeObject - native object to map java script properties
    • Method Detail

      • getPointStyleHandler

        public org.pepstock.charba.client.options.PointStyleHandler getPointStyleHandler()
      • setRadius

        public void setRadius​(double radius)
        Sets the radius of the point shape.
        If set to 0, the point is not rendered.
        Parameters:
        radius - array of the radius of the point shape.
      • getRadius

        public double getRadius()
        Returns the radius of the point.
        Specified by:
        getRadius in interface IsDefaultPoint
        Returns:
        the radius of the point.
      • setHitRadius

        public void setHitRadius​(double hitRadius)
        Sets the pixel size of the non-displayed point that reacts to mouse events.
        Parameters:
        hitRadius - the pixel size of the non-displayed point.
      • getHitRadius

        public double getHitRadius()
        Returns the pixel size of the non-displayed point that reacts to mouse events.
        Specified by:
        getHitRadius in interface IsDefaultPoint
        Returns:
        the pixel size of the non-displayed point.
      • setHoverRadius

        public void setHoverRadius​(double hoverRadius)
        Sets the radius of the point when hovered.
        Parameters:
        hoverRadius - the radius of the point when hovered.
      • getHoverRadius

        public double getHoverRadius()
        Returns the radius of the point when hovered.
        Specified by:
        getHoverRadius in interface IsDefaultPoint
        Returns:
        the radius of the point when hovered.
      • setRotation

        public void setRotation​(double rotation)
        Sets the point rotation (in degrees).
        Parameters:
        rotation - the point rotation (in degrees).
      • getRotation

        public double getRotation()
        Returns the point rotation (in degrees).
        Specified by:
        getRotation in interface IsDefaultPoint
        Returns:
        the point rotation (in degrees).
      • setPointStyle

        public default void setPointStyle​(PointStyle pointStyle)
        Sets the style of the point.
        Parameters:
        pointStyle - array of the style of the point.
      • setPointStyle

        public default void setPointStyle​(Img pointStyle)
        Sets the style of the point as image.
        Parameters:
        pointStyle - image element of the style of the point as image.
      • getPointStyleAsImage

        public default Img getPointStyleAsImage()
        Returns the style of the point as image.
        If property is missing or not an image, returns null.
        Specified by:
        getPointStyleAsImage in interface IsDefaultPointStyleHandler
        Returns:
        image of the style of the point as image.
        If property is missing or not a image, returns null.
      • setPointStyle

        public default void setPointStyle​(Canvas pointStyle)
        Sets the style of the point as canvas.
        Parameters:
        pointStyle - canvas element of the style of the point as canvas.
      • getPointStyleAsCanvas

        public default Canvas getPointStyleAsCanvas()
        Returns the style of the point as canvas.
        If property is missing or not an canvas, returns null.
        Specified by:
        getPointStyleAsCanvas in interface IsDefaultPointStyleHandler
        Returns:
        image of the style of the point as canvas.
        If property is missing or not a canvas, returns null.