Class PieStyler


  • public class PieStyler
    extends Styler
    Author:
    timmolter
    • Constructor Detail

      • PieStyler

        public PieStyler()
    • Method Detail

      • setDefaultSeriesRenderStyle

        public PieStyler setDefaultSeriesRenderStyle​(PieSeries.PieSeriesRenderStyle chartPieSeriesRenderStyle)
        Sets the default series render style for the chart (line, scatter, area, etc.) You can override the series render style individually on each Series object.
        Parameters:
        chartPieSeriesRenderStyle -
      • isCircular

        public boolean isCircular()
      • setCircular

        public PieStyler setCircular​(boolean isCircular)
        Sets whether or not the pie chart is forced to be circular. Otherwise it's shape is oval, matching the containing plot.
        Parameters:
        isCircular -
      • getStartAngleInDegrees

        public double getStartAngleInDegrees()
      • setStartAngleInDegrees

        public PieStyler setStartAngleInDegrees​(double startAngleInDegrees)
        Sets the start angle in degrees. Zero degrees is straight up.
        Parameters:
        startAngleInDegrees -
      • getAnnotationDistance

        public double getAnnotationDistance()
      • setAnnotationDistance

        public void setAnnotationDistance​(double annotationDistance)
        Sets the distance of the pie chart's annotation where 0 is the center, 1 is at the edge and greater than 1 is outside of the pie chart.
        Parameters:
        annotationDistance -
      • setAnnotationType

        public PieStyler setAnnotationType​(PieStyler.AnnotationType annotationType)
        Sets the Pie chart's annotation type
        Parameters:
        annotationType -
      • isDrawAllAnnotations

        public boolean isDrawAllAnnotations()
      • setDrawAllAnnotations

        public PieStyler setDrawAllAnnotations​(boolean drawAllAnnotations)
        By default, only the annotations that will "fit", as determined algorithmically, will be drawn. Otherwise, you can end up with annotations drawn overlapping. If `drawAllAnnotations` is set true with this method, it will override the algorithmic determination, and always draw all the annotations, one for each slice. You can also try playing around with the method `setStartAngleInDegrees` so the the slices are orientated in a more optimal way. You can also try changing the font size. Also, you can order the slices so that a small slice is followed by a larger slice, while setting this method with `true`.
        Parameters:
        drawAllAnnotations -
      • getDonutThickness

        public double getDonutThickness()
      • setDonutThickness

        public void setDonutThickness​(double donutThickness)
        Sets the thickness of the donut ring for donut style pie chart series.
        Parameters:
        donutThickness - - Valid range is between 0 and 1.
      • isSumVisible

        public boolean isSumVisible()
      • setSumVisible

        public PieStyler setSumVisible​(boolean isSumVisible)
        Sets whether or not the sum is visible in the centre of the pie chart.
        Parameters:
        isSumVisible -
      • getSumFont

        public Font getSumFont()
      • setSumFont

        public PieStyler setSumFont​(Font sumFont)
        Sets the font for the sum.
        Parameters:
        sumFont - font
      • setSumFontSize

        public PieStyler setSumFontSize​(float sumFontSize)
        Sets the font size for the sum.
        Parameters:
        sumFontSize -
      • setTheme

        public PieStyler setTheme​(Theme theme)
        Set the theme the styler should use
        Parameters:
        theme -