Class PieChartDataSet

java.lang.Object
org.primefaces.model.charts.ChartDataSet
org.primefaces.model.charts.pie.PieChartDataSet
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DonutChartDataSet

public class PieChartDataSet extends ChartDataSet
Used to provide DataSet objects to Pie chart component.
See Also:
  • Constructor Details

    • PieChartDataSet

      public PieChartDataSet()
  • Method Details

    • getData

      public List<Number> getData()
      Gets the list of data in this dataSet
      Returns:
      List<Number> list of data
    • setData

      public void setData(List<Number> data)
      Sets the list of data in this dataSet
      Parameters:
      data - List<Number> list of data
    • getBackgroundColor

      public List<String> getBackgroundColor()
      Gets the backgroundColor
      Returns:
      backgroundColor
    • setBackgroundColor

      public void setBackgroundColor(List<String> backgroundColor)
      Sets the backgroundColor
      Parameters:
      backgroundColor - The fill color of the arcs in the dataset.
    • getBorderColor

      public List<String> getBorderColor()
      Gets the borderColor
      Returns:
      borderColor
    • setBorderColor

      public void setBorderColor(List<String> borderColor)
      Sets the borderColor
      Parameters:
      borderColor - The border color of the arcs in the dataset.
    • getBorderWidth

      public List<Number> getBorderWidth()
      Gets the borderWidth
      Returns:
      borderWidth
    • setBorderWidth

      public void setBorderWidth(List<Number> borderWidth)
      Sets the borderWidth
      Parameters:
      borderWidth - The border width of the arcs in the dataset.
    • getHoverBackgroundColor

      public List<String> getHoverBackgroundColor()
      Gets the hoverBackgroundColor
      Returns:
      hoverBackgroundColor
    • setHoverBackgroundColor

      public void setHoverBackgroundColor(List<String> hoverBackgroundColor)
      Sets the hoverBackgroundColor
      Parameters:
      hoverBackgroundColor - The fill colour of the arcs when hovered.
    • getHoverBorderColor

      public List<String> getHoverBorderColor()
      Gets the hoverBorderColor
      Returns:
      hoverBorderColor
    • setHoverBorderColor

      public void setHoverBorderColor(List<String> hoverBorderColor)
      Sets the hoverBorderColor
      Parameters:
      hoverBorderColor - The stroke colour of the arcs when hovered.
    • getHoverBorderWidth

      public List<Number> getHoverBorderWidth()
      Gets the hoverBorderWidth
      Returns:
      hoverBorderWidth
    • setHoverBorderWidth

      public void setHoverBorderWidth(List<Number> hoverBorderWidth)
      Sets the hoverBorderWidth
      Parameters:
      hoverBorderWidth - The stroke width of the arcs when hovered.
    • getType

      public String getType()
      Gets the type
      Returns:
      type of current chart
    • encode

      public String encode() throws IOException
      Write the options of this dataSet
      Overrides:
      encode in class ChartDataSet
      Returns:
      options as JSON object
      Throws:
      IOException - If an I/O error occurs