Class AxisItem

  • All Implemented Interfaces:
    IsArea

    public final class AxisItem
    extends ScaleItem
    There are a number of configuration callbacks that can be used to change parameters in the scale at different points in the update process.
    This is a wrapper of the CHART.JS item with all needed info about an axis.
    Implements all set methods to change java script object properties.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • AxisItem

        public AxisItem​(ConfigurationEnvelop<NativeObject> envelop)
        Creates the item using an envelop of native java script object which contains all properties.
        Parameters:
        envelop - envelop of native java script object which contains all properties.
    • Method Detail

      • setFullSize

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

        public void setWeight​(int weight)
        Sets the weight of axis
        Parameters:
        weight - the weight of axis
      • setMaxWidth

        public void setMaxWidth​(int maxWidth)
        Sets the max width of axis in pixel.
        Parameters:
        maxWidth - the max width of axis in pixel.
      • setMaxHeight

        public void setMaxHeight​(int maxHeight)
        Sets the max height of the axis in pixel
        Parameters:
        maxHeight - the max height of the axis in pixel
      • setHeight

        public void setHeight​(int height)
        Sets the height of axis in pixel.
        Parameters:
        height - the height of axis in pixel.
      • setTop

        public void setTop​(int top)
        Sets the top location in pixel
        Parameters:
        top - the top location in pixel
      • setBottom

        public void setBottom​(int bottom)
        Sets the bottom location in pixel
        Parameters:
        bottom - the bottom location in pixel
      • setPaddingLeft

        public void setPaddingLeft​(int paddingLeft)
        Sets the padding left in pixel
        Parameters:
        paddingLeft - the padding left in pixel
      • setPaddingTop

        public void setPaddingTop​(int paddingTop)
        Sets the padding top in pixel
        Parameters:
        paddingTop - the padding top in pixel
      • setPaddingRight

        public void setPaddingRight​(int paddingRight)
        Sets the padding right in pixel
        Parameters:
        paddingRight - the padding right in pixel
      • setPaddingBottom

        public void setPaddingBottom​(int paddingBottom)
        Sets the padding bottom in pixel
        Parameters:
        paddingBottom - the padding bottom in pixel
      • setMin

        public void setMin​(String min)
        Sets the minimum value of axis
        Parameters:
        min - the minimum value of axis
      • setMax

        public void setMax​(String max)
        Sets the maximum value of axis
        Parameters:
        max - the maximum value of axis
      • setMin

        public void setMin​(double min)
        Sets the minimum value of axis
        Parameters:
        min - the minimum value of axis
      • setMax

        public void setMax​(double max)
        Sets the maximum value of axis
        Parameters:
        max - the maximum value of axis
      • setMin

        public void setMin​(Date min)
        Sets the minimum value of axis
        Parameters:
        min - the minimum value of axis
      • setMax

        public void setMax​(Date max)
        Sets the maximum value of axis
        Parameters:
        max - the maximum value of axis
      • setTicks

        public void setTicks​(String... ticks)
        Sets an array of ticks
        Parameters:
        ticks - the array of ticks
      • setStart

        public void setStart​(int start)
        Sets the start value of the axis
        Parameters:
        start - the start value of the axis
      • setEnd

        public void setEnd​(int end)
        Sets the end value of the axis
        Parameters:
        end - the end value of the axis
      • setLabelRotation

        public void setLabelRotation​(double labelRotation)
        Sets the label rotation value
        Parameters:
        labelRotation - the label rotation value
      • setWidth

        public void setWidth​(int width)
        Sets the width of axis
        Parameters:
        width - the width of axis
      • setLeft

        public void setLeft​(int left)
        Sets the left location in pixel
        Parameters:
        left - the left location in pixel
      • setRight

        public void setRight​(int right)
        Sets the right location in pixel
        Parameters:
        right - the right location in pixel
      • setPosition

        public void setPosition​(Position position)
        Sets the position of axis
        Parameters:
        position - the position of axis
      • setPosition

        public void setPosition​(AxisPositionItem position)
        Sets the position of axis
        Parameters:
        position - the position of axis
      • isInside

        public default boolean isInside​(NativeBaseEvent event)
        Returns true if the chart event is inside of a chart element, otherwise false.
        Parameters:
        event - event to check if inside of a chart element.
        Returns:
        true if the chart event is inside a chart element, otherwise false
      • isInside

        public default boolean isInside​(HasNativeEvent container)
        Returns true if the chart event is inside of this box, otherwise false.
        Parameters:
        container - event container to check if inside the box
        Returns:
        true if the chart event is inside of this box, otherwise false