Class Legend

    • Method Detail

      • getTextDirectionHandler

        public org.pepstock.charba.client.options.TextDirectionHandler getTextDirectionHandler()
      • getEventsOptionHandler

        public EventsOptionHandler getEventsOptionHandler()
        Description copied from interface: HasEvents
        Returns a event handler handler instance to use in the default methods of this interface.
        Specified by:
        getEventsOptionHandler in interface HasEvents
        Returns:
        a event handler handler instance
      • setMaxWidth

        public void setMaxWidth​(int maxWidth)
        Sets the maximum width of the legend, in pixels.
        Parameters:
        maxWidth - the maximum width of the legend, in pixels
      • getMaxWidth

        public int getMaxWidth()
        Returns the maximum width of the legend, in pixels.
        Specified by:
        getMaxWidth in interface IsDefaultLegend
        Returns:
        the maximum width of the legend, in pixels
      • setMaxHeight

        public void setMaxHeight​(int maxHeight)
        Sets the maximum height of the legend, in pixels.
        Parameters:
        maxHeight - the maximum height of the legend, in pixels
      • getMaxHeight

        public int getMaxHeight()
        Returns the maximum width of the legend, in pixels.
        Specified by:
        getMaxHeight in interface IsDefaultLegend
        Returns:
        the maximum width of the legend, in pixels
      • setFullSize

        public void setFullSize​(boolean fullSize)
        Marks that this box should take the full width/height of the canvas (moving other boxes).
        Parameters:
        fullSize - Marks that this box should take the full width/height of the canvas (moving other boxes)
      • isFullSize

        public boolean isFullSize()
        Returns if that this box should take the full width/height of the canvas (moving other boxes).
        Specified by:
        isFullSize in interface IsDefaultLegend
        Returns:
        true if that this box should take the full width/height of the canvas (moving other boxes).
      • setReverse

        public void setReverse​(boolean reverse)
        Sets the legend will show datasets in reverse order.
        Parameters:
        reverse - legend will show datasets in reverse order.
      • isReverse

        public boolean isReverse()
        Returns if the legend will show datasets in reverse order.
        Specified by:
        isReverse in interface IsDefaultLegend
        Returns:
        true if legend will show datasets in reverse order.
      • setRtl

        public default void setRtl​(boolean rtl)
        Sets true for rendering the tooltips from right to left.
        Parameters:
        rtl - true for rendering the tooltips from right to left
      • setTextDirection

        public default void setTextDirection​(TextDirection textDirection)
        Sets the text direction of the tooltips that will force the text direction on the canvas for rendering the tooltips, regardless of the CSS specified on the canvas.
        Parameters:
        textDirection - the text direction of the tooltips.
      • getTextDirection

        public default TextDirection getTextDirection()
        Description copied from interface: IsDefaultTextDirectionHandler
        Returns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas.
        Specified by:
        getTextDirection in interface IsDefaultTextDirectionHandler
        Returns:
        the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas
      • setDisplay

        public void setDisplay​(boolean display)
        Sets true if the element is shown.
        Parameters:
        display - if true the element is shown.
      • isDisplay

        public boolean isDisplay()
        Returns true if the element is shown.
        Specified by:
        isDisplay in interface IsDefaultPluginElement
        Returns:
        if true the element is shown.
      • setPosition

        public void setPosition​(Position position)
        Sets the position of element.
        Parameters:
        position - the position of element.
      • setAlign

        public void setAlign​(ElementAlign alignment)
        Sets the alignment of the element.
        Parameters:
        alignment - alignment of the element.