Class AxesGridLines

java.lang.Object
org.primefaces.model.charts.axes.AxesGridLines
All Implemented Interfaces:
Serializable

public class AxesGridLines extends Object implements Serializable
The grid line configuration is nested under the scale configuration.
See Also:
  • Constructor Details

    • AxesGridLines

      public AxesGridLines()
  • Method Details

    • isDisplay

      public boolean isDisplay()
      Gets the display
      Returns:
      display
    • setDisplay

      public void setDisplay(boolean display)
      Sets the display
      Parameters:
      display - If false, do not display grid lines for this axis.
    • getColor

      public Object getColor()
      Gets the color
      Returns:
      color
    • setColor

      public void setColor(Object color)
      Sets the color
      Parameters:
      color - The color of the grid lines. If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on.
    • getBorderDash

      public List<Number> getBorderDash()
      Gets the borderDash
      Returns:
      borderDash
    • setBorderDash

      public void setBorderDash(List<Number> borderDash)
      Sets the borderDash
      Parameters:
      borderDash - Length and spacing of dashes on grid lines.
    • getBorderDashOffset

      public Number getBorderDashOffset()
      Gets the borderDashOffset
      Returns:
      borderDashOffset
    • setBorderDashOffset

      public void setBorderDashOffset(Number borderDashOffset)
      Sets the borderDashOffset
      Parameters:
      borderDashOffset - Offset for line dashes.
    • getLineWidth

      public Object getLineWidth()
      Gets the lineWidth
      Returns:
      lineWidth
    • setLineWidth

      public void setLineWidth(Object lineWidth)
      Sets the lineWidth
      Parameters:
      lineWidth - Stroke width of grid lines.
    • isDrawBorder

      public boolean isDrawBorder()
      Gets the drawBorder
      Returns:
      drawBorder
    • setDrawBorder

      public void setDrawBorder(boolean drawBorder)
      Sets the drawBorder
      Parameters:
      drawBorder - If true, draw border at the edge between the axis and the chart area.
    • isDrawOnChartArea

      public boolean isDrawOnChartArea()
      Gets the drawOnChartArea
      Returns:
      drawOnChartArea
    • setDrawOnChartArea

      public void setDrawOnChartArea(boolean drawOnChartArea)
      Sets the drawOnChartArea
      Parameters:
      drawOnChartArea - If true, draw lines on the chart area inside the axis lines. This is useful when there are multiple axes and you need to control which grid lines are drawn.
    • isDrawTicks

      public boolean isDrawTicks()
      Gets the drawTicks
      Returns:
      drawTicks
    • setDrawTicks

      public void setDrawTicks(boolean drawTicks)
      Sets the drawTicks
      Parameters:
      drawTicks - If true, draw lines beside the ticks in the axis area beside the chart.
    • getTickLength

      public Number getTickLength()
      Gets the tickLength
      Returns:
      tickLength
    • setTickLength

      public void setTickLength(Number tickLength)
      Sets the tickLength
      Parameters:
      tickLength - Length in pixels that the grid lines will draw into the axis area.
    • getZeroLineWidth

      public Number getZeroLineWidth()
      Gets the zeroLineWidth
      Returns:
      zeroLineWidth
    • setZeroLineWidth

      public void setZeroLineWidth(Number zeroLineWidth)
      Sets the zeroLineWidth
      Parameters:
      zeroLineWidth - Stroke width of the grid line for the first index (index 0).
    • getZeroLineColor

      public String getZeroLineColor()
      Gets the zeroLineColor
      Returns:
      zeroLineColor
    • setZeroLineColor

      public void setZeroLineColor(String zeroLineColor)
      Sets the zeroLineColor
      Parameters:
      zeroLineColor - Stroke color of the grid line for the first index (index 0).
    • getZeroLineBorderDash

      public List<Number> getZeroLineBorderDash()
      Gets the zeroLineBorderDash
      Returns:
      zeroLineBorderDash
    • setZeroLineBorderDash

      public void setZeroLineBorderDash(List<Number> zeroLineBorderDash)
      Sets the zeroLineBorderDash
      Parameters:
      zeroLineBorderDash - Length and spacing of dashes of the grid line for the first index (index 0).
    • getZeroLineBorderDashOffset

      public Number getZeroLineBorderDashOffset()
      Gets the zeroLineBorderDashOffset
      Returns:
      zeroLineBorderDashOffset
    • setZeroLineBorderDashOffset

      public void setZeroLineBorderDashOffset(Number zeroLineBorderDashOffset)
      Sets the zeroLineBorderDashOffset
      Parameters:
      zeroLineBorderDashOffset - Offset for line dashes of the grid line for the first index (index 0).
    • isOffset

      public boolean isOffset()
      Gets the offset
      Returns:
      offset
    • setOffset

      public void setOffset(boolean offset)
      Sets the offset
      Parameters:
      offset - If true, grid lines will be shifted to be between labels. This is set to true in the bar chart by default.
    • encode

      public String encode() throws IOException
      Write the common ticks options of axes
      Returns:
      options as JSON object
      Throws:
      IOException - If an I/O error occurs