Package org.primefaces.model.charts.pie
Class PieChartDataSet
java.lang.Object
org.primefaces.model.charts.ChartDataSet
org.primefaces.model.charts.pie.PieChartDataSet
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DonutChartDataSet
Used to provide DataSet objects to Pie chart component.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()
Write the options of this dataSetGets the backgroundColorGets the borderColorGets the borderWidthgetData()
Gets the list of data in this dataSetGets the hoverBackgroundColorGets the hoverBorderColorGets the hoverBorderWidthgetType()
Gets the typevoid
setBackgroundColor
(List<String> backgroundColor) Sets the backgroundColorvoid
setBorderColor
(List<String> borderColor) Sets the borderColorvoid
setBorderWidth
(List<Number> borderWidth) Sets the borderWidthvoid
Sets the list of data in this dataSetvoid
setHoverBackgroundColor
(List<String> hoverBackgroundColor) Sets the hoverBackgroundColorvoid
setHoverBorderColor
(List<String> hoverBorderColor) Sets the hoverBorderColorvoid
setHoverBorderWidth
(List<Number> hoverBorderWidth) Sets the hoverBorderWidthMethods inherited from class org.primefaces.model.charts.ChartDataSet
isHidden, setHidden
-
Constructor Details
-
PieChartDataSet
public PieChartDataSet()
-
-
Method Details
-
getData
Gets the list of data in this dataSet- Returns:
- List<Number> list of data
-
setData
Sets the list of data in this dataSet- Parameters:
data
- List<Number> list of data
-
getBackgroundColor
Gets the backgroundColor- Returns:
- backgroundColor
-
setBackgroundColor
Sets the backgroundColor- Parameters:
backgroundColor
- The fill color of the arcs in the dataset.
-
getBorderColor
Gets the borderColor- Returns:
- borderColor
-
setBorderColor
Sets the borderColor- Parameters:
borderColor
- The border color of the arcs in the dataset.
-
getBorderWidth
Gets the borderWidth- Returns:
- borderWidth
-
setBorderWidth
Sets the borderWidth- Parameters:
borderWidth
- The border width of the arcs in the dataset.
-
getHoverBackgroundColor
Gets the hoverBackgroundColor- Returns:
- hoverBackgroundColor
-
setHoverBackgroundColor
Sets the hoverBackgroundColor- Parameters:
hoverBackgroundColor
- The fill colour of the arcs when hovered.
-
getHoverBorderColor
Gets the hoverBorderColor- Returns:
- hoverBorderColor
-
setHoverBorderColor
Sets the hoverBorderColor- Parameters:
hoverBorderColor
- The stroke colour of the arcs when hovered.
-
getHoverBorderWidth
Gets the hoverBorderWidth- Returns:
- hoverBorderWidth
-
setHoverBorderWidth
Sets the hoverBorderWidth- Parameters:
hoverBorderWidth
- The stroke width of the arcs when hovered.
-
getType
Gets the type- Returns:
- type of current chart
-
encode
Write the options of this dataSet- Overrides:
encode
in classChartDataSet
- Returns:
- options as JSON object
- Throws:
IOException
- If an I/O error occurs
-