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
public class BarChartOptions extends ChartOptions
Used to set options to Bar chart component.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BarChartOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumbergetBarPercentage()Gets the barPercentageNumbergetBarThickness()Gets the barThicknessNumbergetCategoryPercentage()Gets the categoryPercentageNumbergetMaxBarThickness()Gets the maxBarThicknessCartesianScalesgetScales()Gets the options of cartesian scalesbooleanisOffsetGridLines()Gets the offsetGridLinesvoidsetBarPercentage(Number barPercentage)Sets the barPercentagevoidsetBarThickness(Number barThickness)Sets the barThicknessvoidsetCategoryPercentage(Number categoryPercentage)Sets the categoryPercentagevoidsetMaxBarThickness(Number maxBarThickness)Sets the maxBarThicknessvoidsetOffsetGridLines(boolean offsetGridLines)Sets the offsetGridLinesvoidsetScales(CartesianScales scales)Sets the cartesian scales-
Methods inherited from class org.primefaces.model.charts.ChartOptions
getAnimation, getElements, getLegend, getTitle, getTooltip, setAnimation, setElements, setLegend, setTitle, setTooltip
-
-
-
-
Method Detail
-
getBarPercentage
public Number getBarPercentage()
Gets the barPercentage- Returns:
- barPercentage
-
setBarPercentage
public void setBarPercentage(Number barPercentage)
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
public Number getCategoryPercentage()
Gets the categoryPercentage- Returns:
- categoryPercentage
-
setCategoryPercentage
public void setCategoryPercentage(Number categoryPercentage)
Sets the categoryPercentage- Parameters:
categoryPercentage- Percent (0-1) of the available width each category should be within the sample width.
-
getBarThickness
public Number getBarThickness()
Gets the barThickness- Returns:
- barThickness
-
setBarThickness
public void setBarThickness(Number barThickness)
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
public Number getMaxBarThickness()
Gets the maxBarThickness- Returns:
- maxBarThickness
-
setMaxBarThickness
public void setMaxBarThickness(Number maxBarThickness)
Sets the maxBarThickness- Parameters:
maxBarThickness- Set this to ensure that bars are not sized thicker than this.
-
isOffsetGridLines
public boolean isOffsetGridLines()
Gets the offsetGridLines- Returns:
- offsetGridLines
-
setOffsetGridLines
public void setOffsetGridLines(boolean offsetGridLines)
Sets the offsetGridLines- Parameters:
offsetGridLines- If true, the bars for a particular data point fall between the grid lines. The grid line will move to the left by one half of the tick interval. If false, the grid line will go right down the middle of the bars.
-
getScales
public CartesianScales getScales()
Gets the options of cartesian scales- Returns:
- scales
-
setScales
public void setScales(CartesianScales scales)
Sets the cartesian scales- Parameters:
scales- TheCartesianScalesobject
-
-