Class PieSeries
- java.lang.Object
-
- com.cloudofficeprint.RenderElements.Charts.Series.XYSeries
-
- com.cloudofficeprint.RenderElements.Charts.Series.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.
-
-
-
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 classXYSeries
- Returns:
- JsonArray of the data of the serie.
-
-