Package org.primefaces.model.charts.axes
Class AxesGridLines
java.lang.Object
org.primefaces.model.charts.axes.AxesGridLines
- All Implemented Interfaces:
Serializable
The grid line configuration is nested under the scale configuration.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()Write the common ticks options of axesGets the borderDashGets the borderDashOffsetgetColor()Gets the colorGets the lineWidthGets the tickLengthGets the zeroLineBorderDashGets the zeroLineBorderDashOffsetGets the zeroLineColorGets the zeroLineWidthbooleanGets the displaybooleanGets the drawBorderbooleanGets the drawOnChartAreabooleanGets the drawTicksbooleanisOffset()Gets the offsetvoidsetBorderDash(List<Number> borderDash) Sets the borderDashvoidsetBorderDashOffset(Number borderDashOffset) Sets the borderDashOffsetvoidSets 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 lineWidthvoidsetOffset(boolean offset) Sets the offsetvoidsetTickLength(Number tickLength) Sets the tickLengthvoidsetZeroLineBorderDash(List<Number> zeroLineBorderDash) Sets the zeroLineBorderDashvoidsetZeroLineBorderDashOffset(Number zeroLineBorderDashOffset) Sets the zeroLineBorderDashOffsetvoidsetZeroLineColor(String zeroLineColor) Sets the zeroLineColorvoidsetZeroLineWidth(Number zeroLineWidth) Sets the zeroLineWidth
-
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
Gets the color- Returns:
- color
-
setColor
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
Gets the borderDash- Returns:
- borderDash
-
setBorderDash
Sets the borderDash- Parameters:
borderDash- Length and spacing of dashes on grid lines.
-
getBorderDashOffset
Gets the borderDashOffset- Returns:
- borderDashOffset
-
setBorderDashOffset
Sets the borderDashOffset- Parameters:
borderDashOffset- Offset for line dashes.
-
getLineWidth
Gets the lineWidth- Returns:
- lineWidth
-
setLineWidth
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
Gets the tickLength- Returns:
- tickLength
-
setTickLength
Sets the tickLength- Parameters:
tickLength- Length in pixels that the grid lines will draw into the axis area.
-
getZeroLineWidth
Gets the zeroLineWidth- Returns:
- zeroLineWidth
-
setZeroLineWidth
Sets the zeroLineWidth- Parameters:
zeroLineWidth- Stroke width of the grid line for the first index (index 0).
-
getZeroLineColor
Gets the zeroLineColor- Returns:
- zeroLineColor
-
setZeroLineColor
Sets the zeroLineColor- Parameters:
zeroLineColor- Stroke color of the grid line for the first index (index 0).
-
getZeroLineBorderDash
Gets the zeroLineBorderDash- Returns:
- zeroLineBorderDash
-
setZeroLineBorderDash
Sets the zeroLineBorderDash- Parameters:
zeroLineBorderDash- Length and spacing of dashes of the grid line for the first index (index 0).
-
getZeroLineBorderDashOffset
Gets the zeroLineBorderDashOffset- Returns:
- zeroLineBorderDashOffset
-
setZeroLineBorderDashOffset
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
Write the common ticks options of axes- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-