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
      • setBorderJoinStyle

        public void setBorderJoinStyle​(JoinStyle... borderJoinStyle)
        Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).
        Parameters:
        borderJoinStyle - how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
      • getBorderJoinStyle

        public List<JoinStyle> getBorderJoinStyle()
        Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).
        Returns:
        how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
      • setHoverBorderJoinStyle

        public void setHoverBorderJoinStyle​(JoinStyle... borderJoinStyle)
        Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped), when element is hovered.
        There are three possible values for this property: round, bevel and miter. By default this property is set to miter.
        Parameters:
        borderJoinStyle - There are three possible values for this property: round, bevel and miter.
      • getHoverBorderJoinStyle

        public List<JoinStyle> getHoverBorderJoinStyle()
        Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped), when element is hovered.
        There are three possible values for this property: round, bevel and miter. By default this property is set to miter.
        Returns:
        There are three possible values for this property: round, bevel and miter.
      • 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.
      • getBorderJoinStyleCallback

        public JoinStyleCallback<DatasetContext> getBorderJoinStyleCallback()
        Returns the border join style callback, if set, otherwise null.
        Returns:
        the border join style callback, if set, otherwise null.
      • setBorderJoinStyle

        public void setBorderJoinStyle​(NativeCallback borderJoinStyleCallback)
        Sets the border join style callback.
        Parameters:
        borderJoinStyleCallback - the border join style callback.
      • setBorderJoinStyle

        public void setBorderJoinStyle​(JoinStyleCallback<DatasetContext> borderJoinStyleCallback)
        Sets the border join style callback.
        Parameters:
        borderJoinStyleCallback - the border join style callback.
      • getHoverBorderJoinStyleCallback

        public JoinStyleCallback<DatasetContext> getHoverBorderJoinStyleCallback()
        Returns the border join style callback when element is hovered, if set, otherwise null.
        Returns:
        the border join style callback when element is hovered, if set, otherwise null.
      • setHoverBorderJoinStyle

        public void setHoverBorderJoinStyle​(NativeCallback borderJoinStyleCallback)
        Sets the border join style callback when element is hovered.
        Parameters:
        borderJoinStyleCallback - the border join style callback when element is hovered.
      • setHoverBorderJoinStyle

        public void setHoverBorderJoinStyle​(JoinStyleCallback<DatasetContext> borderJoinStyleCallback)
        Sets the border join style callback when element is hovered.
        Parameters:
        borderJoinStyleCallback - the border join style callback when element is hovered.
      • 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