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 String
encode()
Write the common ticks options of axesList<Number>
getBorderDash()
Gets the borderDashNumber
getBorderDashOffset()
Gets the borderDashOffsetObject
getColor()
Gets the colorObject
getLineWidth()
Gets the lineWidthNumber
getTickMarkLength()
Gets the tickMarkLengthList<Number>
getZeroLineBorderDash()
Gets the zeroLineBorderDashNumber
getZeroLineBorderDashOffset()
Gets the zeroLineBorderDashOffsetString
getZeroLineColor()
Gets the zeroLineColorNumber
getZeroLineWidth()
Gets the zeroLineWidthboolean
isDisplay()
Gets the displayboolean
isDrawBorder()
Gets the drawBorderboolean
isDrawOnChartArea()
Gets the drawOnChartAreaboolean
isDrawTicks()
Gets the drawTicksboolean
isOffsetGridLines()
Gets the offsetGridLinesvoid
setBorderDash(List<Number> borderDash)
Sets the borderDashvoid
setBorderDashOffset(Number borderDashOffset)
Sets the borderDashOffsetvoid
setColor(Object color)
Sets the colorvoid
setDisplay(boolean display)
Sets the displayvoid
setDrawBorder(boolean drawBorder)
Sets the drawBordervoid
setDrawOnChartArea(boolean drawOnChartArea)
Sets the drawOnChartAreavoid
setDrawTicks(boolean drawTicks)
Sets the drawTicksvoid
setLineWidth(Object lineWidth)
Sets the lineWidthvoid
setOffsetGridLines(boolean offsetGridLines)
Sets the offsetGridLinesvoid
setTickMarkLength(Number tickMarkLength)
Sets the tickMarkLengthvoid
setZeroLineBorderDash(List<Number> zeroLineBorderDash)
Sets the zeroLineBorderDashvoid
setZeroLineBorderDashOffset(Number zeroLineBorderDashOffset)
Sets the zeroLineBorderDashOffsetvoid
setZeroLineColor(String zeroLineColor)
Sets the zeroLineColorvoid
setZeroLineWidth(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
-
-