Package org.primefaces.model.charts.bar
Class BarChartOptions
java.lang.Object
org.primefaces.model.charts.ChartOptions
org.primefaces.model.charts.bar.BarChartOptions
- All Implemented Interfaces:
Serializable
Used to set options to Bar chart component.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the barPercentageGets the barThicknessGets the categoryPercentageVertical bar chart (x) or horizontal bar char (y)Gets the maxBarThicknessGets the options of cartesian scalesvoidsetBarPercentage(Number barPercentage) Sets the barPercentagevoidsetBarThickness(Number barThickness) Sets the barThicknessvoidsetCategoryPercentage(Number categoryPercentage) Sets the categoryPercentagevoidsetIndexAxis(String indexAxis) Switches between vertical and horizontal Bar ChartvoidsetMaxBarThickness(Number maxBarThickness) Sets the maxBarThicknessvoidsetScales(CartesianScales scales) Sets the cartesian scalesMethods inherited from class org.primefaces.model.charts.ChartOptions
getAnimation, getAspectRatio, getElements, getLegend, getSubtitle, getTitle, getTooltip, isMaintainAspectRatio, isResponsive, setAnimation, setAspectRatio, setElements, setLegend, setMaintainAspectRatio, setResponsive, setSubtitle, setTitle, setTooltip
-
Constructor Details
-
BarChartOptions
public BarChartOptions()
-
-
Method Details
-
getBarPercentage
Gets the barPercentage- Returns:
- barPercentage
-
setBarPercentage
Sets the barPercentage- Parameters:
barPercentage- Percent (0-1) of the available width each bar should be within the category width. 1.0 will take the whole category width and put the bars right next to each other.
-
getCategoryPercentage
Gets the categoryPercentage- Returns:
- categoryPercentage
-
setCategoryPercentage
Sets the categoryPercentage- Parameters:
categoryPercentage- Percent (0-1) of the available width each category should be within the sample width.
-
getBarThickness
Gets the barThickness- Returns:
- barThickness
-
setBarThickness
Sets the barThickness- Parameters:
barThickness- Manually set width of each bar in pixels. If not set, the base sample widths are calculated automatically so that they take the full available widths without overlap. Then, the bars are sized using barPercentage and categoryPercentage.
-
getMaxBarThickness
Gets the maxBarThickness- Returns:
- maxBarThickness
-
setMaxBarThickness
Sets the maxBarThickness- Parameters:
maxBarThickness- Set this to ensure that bars are not sized thicker than this.
-
getScales
Gets the options of cartesian scales- Returns:
- scales
-
setScales
Sets the cartesian scales- Parameters:
scales- TheCartesianScalesobject
-
getIndexAxis
Vertical bar chart (x) or horizontal bar char (y)- Returns:
-
setIndexAxis
Switches between vertical and horizontal Bar Chart- Parameters:
indexAxis- x (=vertical bar chart) or y (=horizontal bar chart)
-