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:
  • Constructor Details

    • BarChartOptions

      public BarChartOptions()
  • Method Details

    • 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.
    • getScales

      public CartesianScales getScales()
      Gets the options of cartesian scales
      Returns:
      scales
    • setScales

      public void setScales(CartesianScales scales)
      Sets the cartesian scales
      Parameters:
      scales - The CartesianScales object
    • getIndexAxis

      public String getIndexAxis()
      Vertical bar chart (x) or horizontal bar char (y)
      Returns:
    • setIndexAxis

      public void setIndexAxis(String indexAxis)
      Switches between vertical and horizontal Bar Chart
      Parameters:
      indexAxis - x (=vertical bar chart) or y (=horizontal bar chart)