Class Bar

    • Constructor Detail

      • Bar

        protected Bar​(Elements elements,
                      Key childKey,
                      IsDefaultBar 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()
      • setEnableBorderRadius

        public void setEnableBorderRadius​(boolean enableBorderRadius)
        If true, it only shows the borderRadius of a bar when the bar is at the end of the stack.
        Parameters:
        enableBorderRadius - if true, it only shows the borderRadius of a bar when the bar is at the end of the stack
      • isEnableBorderRadius

        public boolean isEnableBorderRadius()
        If true, it only shows the borderRadius of a bar when the bar is at the end of the stack.
        Specified by:
        isEnableBorderRadius in interface IsDefaultBar
        Returns:
        if true, it only shows the borderRadius of a bar when the bar is at the end of the stack
      • setBorderSkipped

        public void setBorderSkipped​(boolean borderskip)
        Sets the edge to skip drawing the border for.
        Parameters:
        borderskip - to set false as border skipped. If set true, is ignored
      • setBorderSkipped

        public void setBorderSkipped​(BorderSkipped position)
        Sets the edge to skip drawing the border for.
        Parameters:
        position - the edge to skip drawing the border for.
      • getBorderSkipped

        public BorderSkipped getBorderSkipped()
        Returns the edge to skip drawing the border for.
        Specified by:
        getBorderSkipped in interface IsDefaultBar
        Returns:
        the edge to skip drawing the border for.
      • setBorderRadius

        public void setBorderRadius​(int borderRadius)
        Sets the bar border radius (in pixels).
        Parameters:
        borderRadius - the bar border radius (in pixels).
      • getBorderRadius

        public int getBorderRadius()
        Returns the bar border radius (in pixels).
        Specified by:
        getBorderRadius in interface IsDefaultBar
        Returns:
        the bar border radius (in pixels).
      • setHoverBorderRadius

        public void setHoverBorderRadius​(int borderRadius)
        Sets the bar border radius (in pixels) when hovered.
        Parameters:
        borderRadius - the bar border radius (in pixels) when hovered.
      • getHoverBorderRadius

        public int getHoverBorderRadius()
        Returns the bar border radius (in pixels) when hovered.
        Specified by:
        getHoverBorderRadius in interface IsDefaultBar
        Returns:
        the bar border radius (in pixels) when hovered.
      • setAutoInflateAmount

        public void setAutoInflateAmount​(boolean autoInflateAmount)
        Sets true if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.
        Parameters:
        autoInflateAmount - true if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
      • isAutoInflateAmount

        public boolean isAutoInflateAmount()
        Returns true if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.
        Specified by:
        isAutoInflateAmount in interface IsDefaultBar
        Returns:
        true if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
      • setInflateAmount

        public void setInflateAmount​(int inflateAmount)
        Sets the amount of pixels to inflate the bar rectangles, when drawing.
        Parameters:
        inflateAmount - the amount of pixels to inflate the bar rectangles, when drawing
      • getInflateAmount

        public int getInflateAmount()
        Returns the amount of pixels to inflate the bar rectangles, when drawing.
        Specified by:
        getInflateAmount in interface IsDefaultBar
        Returns:
        the amount of pixels to inflate the bar rectangles, when drawing
      • 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.