Package org.primefaces.model.charts.axes
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AxesGridLines()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringencode()Write the common ticks options of axesList<Number>getBorderDash()Gets the borderDashNumbergetBorderDashOffset()Gets the borderDashOffsetObjectgetColor()Gets the colorObjectgetLineWidth()Gets the lineWidthNumbergetTickMarkLength()Gets the tickMarkLengthList<Number>getZeroLineBorderDash()Gets the zeroLineBorderDashNumbergetZeroLineBorderDashOffset()Gets the zeroLineBorderDashOffsetStringgetZeroLineColor()Gets the zeroLineColorNumbergetZeroLineWidth()Gets the zeroLineWidthbooleanisDisplay()Gets the displaybooleanisDrawBorder()Gets the drawBorderbooleanisDrawOnChartArea()Gets the drawOnChartAreabooleanisDrawTicks()Gets the drawTicksbooleanisOffsetGridLines()Gets the offsetGridLinesvoidsetBorderDash(List<Number> borderDash)Sets the borderDashvoidsetBorderDashOffset(Number borderDashOffset)Sets the borderDashOffsetvoidsetColor(Object color)Sets the colorvoidsetDisplay(boolean display)Sets the displayvoidsetDrawBorder(boolean drawBorder)Sets the drawBordervoidsetDrawOnChartArea(boolean drawOnChartArea)Sets the drawOnChartAreavoidsetDrawTicks(boolean drawTicks)Sets the drawTicksvoidsetLineWidth(Object lineWidth)Sets the lineWidthvoidsetOffsetGridLines(boolean offsetGridLines)Sets the offsetGridLinesvoidsetTickMarkLength(Number tickMarkLength)Sets the tickMarkLengthvoidsetZeroLineBorderDash(List<Number> zeroLineBorderDash)Sets the zeroLineBorderDashvoidsetZeroLineBorderDashOffset(Number zeroLineBorderDashOffset)Sets the zeroLineBorderDashOffsetvoidsetZeroLineColor(String zeroLineColor)Sets the zeroLineColorvoidsetZeroLineWidth(Number zeroLineWidth)Sets the zeroLineWidth
-
-
-
Method Detail
-
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.
-
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.
-
getTickMarkLength
public Number getTickMarkLength()
Gets the tickMarkLength- Returns:
- tickMarkLength
-
setTickMarkLength
public void setTickMarkLength(Number tickMarkLength)
Sets the tickMarkLength- Parameters:
tickMarkLength- 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).
-
isOffsetGridLines
public boolean isOffsetGridLines()
Gets the offsetGridLines- Returns:
- offsetGridLines
-
setOffsetGridLines
public void setOffsetGridLines(boolean offsetGridLines)
Sets the offsetGridLines- Parameters:
offsetGridLines- 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
-
-