Package org.primefaces.model.charts.bar
Class BarChartDataSet
java.lang.Object
org.primefaces.model.charts.ChartDataSet
org.primefaces.model.charts.bar.BarChartDataSet
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HorizontalBarChartDataSet
Used to provide DataSet objects to Bar chart component.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()Write the options of this dataSetGets the backgroundColorGets the borderColorGets the borderSkippedGets the borderWidthgetData()Gets the list of data in this dataSetGets the hoverBackgroundColorGets the hoverBorderColorGets the hoverBorderWidthgetLabel()Gets the labelgetStack()Gets the stackgetType()Gets the typeGets the xAxisIDGets the yAxisIDvoidsetBackgroundColor(Object backgroundColor) Sets the backgroundColorvoidsetBorderColor(Object borderColor) Sets the borderColorvoidsetBorderSkipped(String borderSkipped) Sets the borderSkippedvoidsetBorderWidth(Object borderWidth) Sets the borderWidthvoidSets the list of data in this dataSetvoidsetHoverBackgroundColor(Object hoverBackgroundColor) Sets the hoverBackgroundColorvoidsetHoverBorderColor(Object hoverBorderColor) Sets the hoverBorderColorvoidsetHoverBorderWidth(Object hoverBorderWidth) Sets the hoverBorderWidthvoidSets the labelvoidSets the stackvoidsetXaxisID(String xaxisID) Sets the xAxisIDvoidsetYaxisID(String yaxisID) Sets the yAxisIDMethods inherited from class org.primefaces.model.charts.ChartDataSet
isHidden, setHidden
-
Constructor Details
-
BarChartDataSet
public BarChartDataSet()
-
-
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
-
getLabel
Gets the label- Returns:
- label
-
setLabel
Sets the label- Parameters:
label- The label for the dataset which appears in the legend and tooltips
-
getXaxisID
Gets the xAxisID- Returns:
- xAxisID
-
setXaxisID
Sets the xAxisID- Parameters:
xaxisID- The ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis
-
getYaxisID
Gets the yAxisID- Returns:
- yAxisID
-
setYaxisID
Sets the yAxisID- Parameters:
yaxisID- The ID of the y axis to plot this dataset on. If not specified, this defaults to the ID of the first found y axis.
-
getStack
Gets the stack- Returns:
- stack
-
setStack
Sets the stack- Parameters:
stack- The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack)
-
getBackgroundColor
Gets the backgroundColor- Returns:
- backgroundColor
-
setBackgroundColor
Sets the backgroundColor- Parameters:
backgroundColor- The fill color of the bar.
-
getBorderColor
Gets the borderColor- Returns:
- borderColor
-
setBorderColor
Sets the borderColor- Parameters:
borderColor- The color of the bar border.
-
getBorderWidth
Gets the borderWidth- Returns:
- borderWidth
-
setBorderWidth
Sets the borderWidth- Parameters:
borderWidth- The stroke width of the bar in pixels.
-
getBorderSkipped
Gets the borderSkipped- Returns:
- borderSkipped
-
setBorderSkipped
Sets the borderSkipped- Parameters:
borderSkipped- Which edge to skip drawing the border for.
-
getHoverBackgroundColor
Gets the hoverBackgroundColor- Returns:
- hoverBackgroundColor
-
setHoverBackgroundColor
Sets the hoverBackgroundColor- Parameters:
hoverBackgroundColor- The fill colour of the bars when hovered.
-
getHoverBorderColor
Gets the hoverBorderColor- Returns:
- hoverBorderColor
-
setHoverBorderColor
Sets the hoverBorderColor- Parameters:
hoverBorderColor- The stroke colour of the bars when hovered.
-
getHoverBorderWidth
Gets the hoverBorderWidth- Returns:
- hoverBorderWidth
-
setHoverBorderWidth
Sets the hoverBorderWidth- Parameters:
hoverBorderWidth- The stroke width of the bars when hovered.
-
getType
Gets the type- Returns:
- type of current chart
-
encode
Write the options of this dataSet- Overrides:
encodein classChartDataSet- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-