Class Clip

  • All Implemented Interfaces:
    IsArea

    public final class Clip
    extends NativeObjectContainer
    implements IsArea
    Defines how to clip relative to the chart area.
    Positive value allows overflow, negative value clips that many pixels inside the chart area.
    If sets false, that means that CHART.JS will use chart area dimension.
    With false value, the properties will be:
    • Left is 0
    • Top is 0
    • Right is area right
    • Bottom is area bottom
    Author:
    Andrea "Stock" Stocchero
    See Also:
    ChartAreaNode
    • Constructor Detail

      • Clip

        public Clip()
        Creates the object with an empty native object instance.
      • Clip

        public Clip​(double clip)
        Creates the object with the same clip value for all dimensions.
        Parameters:
        clip - clip value for all dimensions
    • Method Detail

      • set

        public void set​(double clip)
        Sets the clip size to all dimensions.
        Parameters:
        clip - clip to apply to all dimensions.
      • setLeft

        public void setLeft​(double clip)
        Sets the clip left.
        Parameters:
        clip - the clip left.
      • setLeft

        public void setLeft​(boolean clip)
        Sets the clip left.
        Parameters:
        clip - the clip left.
      • getLeft

        public double getLeft()
        Returns the clip left.
        Specified by:
        getLeft in interface IsArea
        Returns:
        the clip left.
      • isLeft

        public boolean isLeft()
        Returns false if the clip left has been set.
        Returns:
        false if the clip left has been set
      • setRight

        public void setRight​(double clip)
        Sets the clip right.
        Parameters:
        clip - the clip right.
      • setRight

        public void setRight​(boolean clip)
        Sets the clip right.
        Parameters:
        clip - the clip right.
      • getRight

        public double getRight()
        Returns the clip right.
        Specified by:
        getRight in interface IsArea
        Returns:
        the clip right.
      • isRight

        public boolean isRight()
        Returns false if the clip right has been set.
        Returns:
        false if the clip right has been set
      • setTop

        public void setTop​(double clip)
        Sets the clip top.
        Parameters:
        clip - the clip top.
      • setTop

        public void setTop​(boolean clip)
        Sets the clip top.
        Parameters:
        clip - the clip top.
      • getTop

        public double getTop()
        Returns the clip top.
        Specified by:
        getTop in interface IsArea
        Returns:
        the clip top.
      • isTop

        public boolean isTop()
        Returns false if the clip top has been set.
        Returns:
        false if the clip top has been set
      • setBottom

        public void setBottom​(double clip)
        Sets the clip bottom.
        Parameters:
        clip - the clip bottom.
      • setBottom

        public void setBottom​(boolean clip)
        Sets the clip bottom.
        Parameters:
        clip - the clip bottom.
      • getBottom

        public double getBottom()
        Returns the clip bottom.
        Specified by:
        getBottom in interface IsArea
        Returns:
        the clip bottom.
      • isBottom

        public boolean isBottom()
        Returns false if the clip bottom has been set.
        Returns:
        false if the clip bottom has been set