Class PieSeries


  • public class PieSeries
    extends XYSeries
    This class represents series for pie charts.
    • Constructor Summary

      Constructors 
      Constructor Description
      PieSeries​(java.lang.String name, java.lang.String[] x, java.lang.String[] y, java.lang.String[] colors)
      This object represents series for a pie chart.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getColors()
      Note : If no colors are specified, the document's theme is used.
      com.google.gson.JsonArray getJSONData()  
      void setColors​(java.lang.String[] colors)
      Note : If no colors are specified, the document's theme is used.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PieSeries

        public PieSeries​(java.lang.String name,
                         java.lang.String[] x,
                         java.lang.String[] y,
                         java.lang.String[] colors)
        This object represents series for a pie chart.
        Parameters:
        name - Name of the chart.
        x - X-data of the chart.
        y - Y-data of the chart.
        colors - Colors for each pie slice. Note : If no colors are specified (null argument), the document's theme is used. If some colors are specified, but not for all data points, random colors will fill the gaps. (setColor() doesn't have an impact on pieseries.)
    • Method Detail

      • getColors

        public java.lang.String[] getColors()
        Note : If no colors are specified, the document's theme is used. If some colors are specified, but not for all data points, random colors will fill the gaps.
        Returns:
        Individual colors for each pie slice in CSS format.
      • setColors

        public void setColors​(java.lang.String[] colors)
        Note : If no colors are specified, the document's theme is used. If some colors are specified, but not for all data points, random colors will fill the gaps.
        Parameters:
        colors - Individual colors for each pie slice.
      • getJSONData

        public com.google.gson.JsonArray getJSONData()
        Overrides:
        getJSONData in class XYSeries
        Returns:
        JsonArray of the data of the serie.