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 borderColorGet the borderRadius attribute value, may be a number orBarCornerGets the borderSkippedGets the borderWidthgetData()Gets the list of data in this dataSet.Gets the hoverBackgroundColorGets the hoverBorderColorGet the border radius of the bar when hoveredGets the hoverBorderWidthgetLabel()Gets the labelgetStack()Gets the stackgetType()Gets the typeGets the xAxisIDGets the yAxisIDvoidsetBackgroundColor(Object backgroundColor) Sets the backgroundColorvoidsetBorderColor(Object borderColor) Sets the borderColorvoidsetBorderRadius(Object borderRadius) Set the borderRadius attribute value,voidsetBorderSkipped(String borderSkipped) Sets the borderSkippedvoidsetBorderWidth(Object borderWidth) Sets the borderWidthvoidSets the list of data in this dataSet.voidsetHoverBackgroundColor(Object hoverBackgroundColor) Sets the hoverBackgroundColorvoidsetHoverBorderColor(Object hoverBorderColor) Sets the hoverBorderColorvoidsetHoverBorderRadius(Object hoverBorderRadius) Get the border radius of the bar when hoveredvoidsetHoverBorderWidth(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. Can either be a Number or a type of ChartJs Point.- Returns:
- List<Object> list of data
-
setData
Sets the list of data in this dataSet. Can either be a Number or a type of ChartJs Point.- Parameters:
data- List<Object> 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.
-
getBorderRadius
Get the borderRadius attribute value, may be a number orBarCorner- Returns:
- borderRadius value
-
setBorderRadius
Set the borderRadius attribute value,- Parameters:
borderRadius- may be an integer orBarCorner
-
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.
-
getHoverBorderRadius
Get the border radius of the bar when hovered- Returns:
- the border radius, may be an integer or
BarCorner
-
setHoverBorderRadius
Get the border radius of the bar when hovered- Parameters:
hoverBorderRadius- the border radius, may be an integer orBarCorner
-
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
-