Class PieDataset

    • Constructor Detail

      • PieDataset

        public PieDataset()
        Creates a dataset.
        It uses the global options has default.
      • PieDataset

        public PieDataset​(boolean hidden)
        Creates a dataset.
        It uses the global options has default.
        Parameters:
        hidden - if true, it will be initially hidden.
      • PieDataset

        public PieDataset​(IsDefaultOptions defaultValues)
        Creates the dataset using a default.
        Parameters:
        defaultValues - default options
      • PieDataset

        public PieDataset​(IsDefaultOptions defaultValues,
                          boolean hidden)
        Creates the dataset using a default.
        Parameters:
        defaultValues - default options
        hidden - if true, it will be initially hidden.
      • PieDataset

        protected PieDataset​(Type type,
                             boolean hidden)
        Creates the dataset using chart type related to the dataset.
        Parameters:
        type - chart type related to the dataset
        hidden - if true, it will be initially hidden.
      • PieDataset

        protected PieDataset​(Type type,
                             IsDefaultOptions defaultValues,
                             boolean hidden)
        Creates the dataset using a default and chart type related to the dataset.
        Parameters:
        type - chart type related to the dataset
        defaultValues - default options
        hidden - if true, it will be initially hidden.
    • Method Detail

      • getBorderAlignHandler

        public final org.pepstock.charba.client.data.BorderAlignHandler getBorderAlignHandler()
      • setRotation

        public void setRotation​(double rotation)
        Sets the starting angle to draw arcs from.
        Parameters:
        rotation - starting angle to draw arcs from.
      • getRotation

        public double getRotation()
        Returns the starting angle to draw arcs from.
        Returns:
        starting angle to draw arcs from.
      • setSpacing

        public void setSpacing​(int spacing)
        Sets the fixed arc offset (in pixels).
        Similar to offset but applies to all arcs.
        Parameters:
        spacing - the fixed arc offset (in pixels)
      • getSpacing

        public int getSpacing()
        Returns the fixed arc offset (in pixels).
        Similar to offset but applies to all arcs.
        Returns:
        the fixed arc offset (in pixels)
      • setCircumference

        public void setCircumference​(double circumference)
        Sets the sweep to allow arcs to cover.
        Parameters:
        circumference - the sweep to allow arcs to cover.
      • getCircumference

        public double getCircumference()
        Returns the sweep to allow arcs to cover.
        Returns:
        the sweep to allow arcs to cover.
      • setWeight

        public void setWeight​(double weight)
        Sets the relative thickness of the dataset.
        Providing a value for weight will cause the pie or doughnut dataset to be drawn with a thickness relative to the sum of all the dataset weight values.
        Parameters:
        weight - the relative thickness of the dataset
      • getWeight

        public double getWeight()
        Returns the relative thickness of the dataset.
        Providing a value for weight will cause the pie or doughnut dataset to be drawn with a thickness relative to the sum of all the dataset weight values.
        Returns:
        the relative thickness of the dataset
      • setOffset

        public void setOffset​(int... offset)
        Sets the arc offset (in pixels).
        Parameters:
        offset - the arc offset
      • getOffset

        public List<Integer> getOffset()
        Returns the arc offset (in pixels).
        Returns:
        the arc offset
      • setHoverOffset

        public void setHoverOffset​(int... offset)
        Sets the arc offset (in pixels), when dataset if hovered.
        Parameters:
        offset - the arc offset, when dataset if hovered
      • getHoverOffset

        public List<Integer> getHoverOffset()
        Returns the arc offset (in pixels), when dataset if hovered.
        Returns:
        the arc offset, when dataset if hovered
      • setBorderRadius

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

        public void setBorderRadius​(ArcBorderRadius... borderRadius)
        Sets the arc border radius objects.
        Parameters:
        borderRadius - the arc border radius objects.
      • setBorderRadius

        public void setBorderRadius​(List<ArcBorderRadius> borderRadius)
        Sets the arc border radius objects.
        Parameters:
        borderRadius - the arc border radius objects.
      • getBorderRadius

        public List<Integer> getBorderRadius()
        Returns the list of arc border radius (in pixels).
        If a callback has been set, returns an empty list.
        Returns:
        the list of arc border radius (in pixels).
        If a callback has been set, returns an empty list
      • getBorderRadiusAsObjects

        public List<ArcBorderRadius> getBorderRadiusAsObjects()
        Returns the list of arc border radius objects.
        If a callback or an array have been set, returns an empty object.
        Returns:
        the list of arc border radius objects.
        If a callback or an array have been set, returns an empty object
      • getOffsetCallback

        public OffsetCallback<DatasetContext> getOffsetCallback()
        Returns the offset callback, if set, otherwise null.
        Returns:
        the offset callback, if set, otherwise null.
      • setOffset

        public void setOffset​(OffsetCallback<DatasetContext> offsetCallback)
        Sets the offset callback.
        Parameters:
        offsetCallback - the offset callback.
      • setOffset

        public void setOffset​(NativeCallback offsetCallback)
        Sets the offset callback.
        Parameters:
        offsetCallback - the offset callback.
      • getHoverOffsetCallback

        public OffsetCallback<DatasetContext> getHoverOffsetCallback()
        Returns the offset callback, when dataset is hovered, if set, otherwise null.
        Returns:
        the offset callback, when dataset is hovered, if set, otherwise null.
      • setHoverOffset

        public void setHoverOffset​(OffsetCallback<DatasetContext> hoverOffsetCallback)
        Sets the offset callback, when dataset is hovered.
        Parameters:
        hoverOffsetCallback - the offset callback, when dataset is hovered.
      • setHoverOffset

        public void setHoverOffset​(NativeCallback hoverOffsetCallback)
        Sets the offset callback, when dataset is hovered.
        Parameters:
        hoverOffsetCallback - the offset callback, when dataset is hovered.
      • getBorderRadiusCallback

        public BorderRadiusCallback<DatasetContext> getBorderRadiusCallback()
        Returns the border radius callback, if set, otherwise null.
        Returns:
        the border radius callback, if set, otherwise null.
      • setBorderRadius

        public void setBorderRadius​(BorderRadiusCallback<DatasetContext> borderRadiusCallback)
        Sets the border radius callback.
        Parameters:
        borderRadiusCallback - the border radius callback.
      • setBorderRadius

        public void setBorderRadius​(NativeCallback borderRadiusCallback)
        Sets the border radius callback.
        Parameters:
        borderRadiusCallback - the border radius callback.
      • setBorderAlign

        public default void setBorderAlign​(BorderAlign... align)
        Sets the property to set the border alignment on chart datasets.
        Parameters:
        align - the property to set the border alignment on chart datasets
      • setBorderAlign

        public default void setBorderAlign​(List<BorderAlign> align)
        Sets the property to set the border alignment on chart datasets.
        Parameters:
        align - the property to set the border alignment on chart datasets
      • getBorderAlign

        public default List<BorderAlign> getBorderAlign()
        Returns the property to set the border alignment on chart datasets.
        Returns:
        the property to set the border alignment on chart datasets.
      • getBorderAlignCallback

        public default BorderAlignCallback getBorderAlignCallback()
        Returns the border align callback, if set, otherwise null.
        Returns:
        the border align callback, if set, otherwise null.
      • setBorderAlign

        public default void setBorderAlign​(BorderAlignCallback borderAlignCallback)
        Sets the border align callback.
        Parameters:
        borderAlignCallback - the border align callback to set
      • setBorderAlign

        public default void setBorderAlign​(NativeCallback borderAlignCallback)
        Sets the border align callback.
        Parameters:
        borderAlignCallback - the border align callback to set