public final class GridLines extends AbstractModel<Scale,IsDefaultGridLines> implements IsDefaultGridLines
Modifier and Type | Method and Description |
---|---|
List<Integer> |
getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of
lines and gaps which describe the pattern.
|
int |
getBorderDashOffset()
Returns the line dash pattern offset or "phase".
|
List<IsColor> |
getColor()
The color of the grid lines.
|
String |
getColorAsString()
The color of the grid lines.
|
List<String> |
getColorsAsString()
The color of the grid lines.
|
List<Integer> |
getLinesWidth()
Returns the stroke widths of grid lines.
|
int |
getLineWidth()
Returns the stroke width of grid lines.
|
int |
getTickMarkLength()
Returns the length in pixels that the grid lines will draw into the axis area.
|
List<Integer> |
getZeroLineBorderDash()
Returns the length and spacing of dashes of the grid line for the first index (index 0).
|
int |
getZeroLineBorderDashOffset()
Returns the offset for line dashes of the grid line for the first index (index 0).
|
IsColor |
getZeroLineColor()
Returns the stroke color of the grid line for the first index (index 0).
|
String |
getZeroLineColorAsString()
Returns the stroke color of the grid line for the first index (index 0).
|
int |
getZeroLineWidth()
Returns the stroke width of the grid line for the first index (index 0).
|
boolean |
isCircular()
If
true , gridlines are circular (on radar chart only). |
boolean |
isDisplay()
If
false , do not display grid lines for this axis. |
boolean |
isDrawBorder()
If
true , draw border at the edge between the axis and the chart area. |
boolean |
isDrawOnChartArea()
If
true , draw lines on the chart area inside the axis lines. |
boolean |
isDrawTicks()
If
true , draw lines beside the ticks in the axis area beside the chart. |
boolean |
isOffsetGridLines()
If
true , grid lines will be shifted to be between labels. |
void |
setBorderDash(int... borderDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines
and gaps which describe the pattern.
|
void |
setBorderDashOffset(int borderDashOffset)
Sets the line dash pattern offset or "phase".
|
void |
setCircular(boolean circular)
If
true , gridlines are circular (on radar chart only). |
void |
setColor(IsColor... color)
The color of the grid lines.
|
void |
setColor(String... color)
The color of the grid lines.
|
void |
setDisplay(boolean display)
If
false , do not display grid lines for this axis. |
void |
setDrawBorder(boolean drawBorder)
If
true , draw border at the edge between the axis and the chart area. |
void |
setDrawOnChartArea(boolean drawOnChartArea)
If
true , draw lines on the chart area inside the axis lines. |
void |
setDrawTicks(boolean drawTicks)
If
true , draw lines beside the ticks in the axis area beside the chart. |
void |
setLineWidth(int... lineWidth)
Sets the stroke widths of grid lines.
|
void |
setOffsetGridLines(boolean offsetGridLines)
If
true , grid lines will be shifted to be between labels. |
void |
setTickMarkLength(int tickMarkLength)
Sets the length in pixels that the grid lines will draw into the axis area.
|
void |
setZeroLineBorderDash(int... zeroLineBorderDash)
Sets the length and spacing of dashes of the grid line for the first index (index 0).
|
void |
setZeroLineBorderDashOffset(int zeroLineBorderDashOffset)
Sets the offset for line dashes of the grid line for the first index (index 0).
|
void |
setZeroLineColor(IsColor zeroLineColor)
Sets the stroke color of the grid line for the first index (index 0).
|
void |
setZeroLineColor(String zeroLineColor)
Sets the stroke color of the grid line for the first index (index 0).
|
void |
setZeroLineWidth(int zeroLineWidth)
Sets the stroke width of the grid line for the first index (index 0).
|
checkAndAddToParent, getChildKey, getDefaultValues, getParent, setCallbackToModel, setEventToModel
getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public void setDisplay(boolean display)
false
, do not display grid lines for this axis.display
- If false
, do not display grid lines for this axis.public boolean isDisplay()
false
, do not display grid lines for this axis.isDisplay
in interface IsDefaultGridLines
false
, do not display grid lines for this axis.public void setCircular(boolean circular)
true
, gridlines are circular (on radar chart only).circular
- If true
, gridlines are circular (on radar chart only).public boolean isCircular()
true
, gridlines are circular (on radar chart only).isCircular
in interface IsDefaultGridLines
true
, gridlines are circular (on radar chart only).public void setColor(IsColor... color)
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.public void setColor(String... color)
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.public String getColorAsString()
getColorAsString
in interface IsDefaultGridLines
public List<String> getColorsAsString()
public List<IsColor> getColor()
public void setBorderDash(int... borderDash)
borderDash
- the line dash pattern used when stroking linespublic List<Integer> getBorderDash()
public void setBorderDashOffset(int borderDashOffset)
borderDashOffset
- Offset for line dashes.public int getBorderDashOffset()
getBorderDashOffset
in interface IsDefaultGridLines
public void setLineWidth(int... lineWidth)
lineWidth
- stroke widths of grid lines.public int getLineWidth()
getLineWidth
in interface IsDefaultGridLines
public List<Integer> getLinesWidth()
public void setDrawBorder(boolean drawBorder)
true
, draw border at the edge between the axis and the chart area.drawBorder
- If true
, draw border at the edge between the axis and the chart area.public boolean isDrawBorder()
true
, draw border at the edge between the axis and the chart area.isDrawBorder
in interface IsDefaultGridLines
true
, draw border at the edge between the axis and the chart area.public void setDrawOnChartArea(boolean drawOnChartArea)
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.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.public boolean isDrawOnChartArea()
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.isDrawOnChartArea
in interface IsDefaultGridLines
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.public void setDrawTicks(boolean drawTicks)
true
, draw lines beside the ticks in the axis area beside the chart.drawTicks
- If true
, draw lines beside the ticks in the axis area beside the chart.public boolean isDrawTicks()
true
, draw lines beside the ticks in the axis area beside the chart.isDrawTicks
in interface IsDefaultGridLines
true
, draw lines beside the ticks in the axis area beside the chart.public void setTickMarkLength(int tickMarkLength)
tickMarkLength
- Length in pixels that the grid lines will draw into the axis area.public int getTickMarkLength()
getTickMarkLength
in interface IsDefaultGridLines
public void setZeroLineWidth(int zeroLineWidth)
zeroLineWidth
- Stroke width of the grid line for the first index (index 0).public int getZeroLineWidth()
getZeroLineWidth
in interface IsDefaultGridLines
public void setZeroLineColor(IsColor zeroLineColor)
zeroLineColor
- Stroke color of the grid line for the first index (index 0).public void setZeroLineColor(String zeroLineColor)
zeroLineColor
- Stroke color of the grid line for the first index (index 0).public String getZeroLineColorAsString()
getZeroLineColorAsString
in interface IsDefaultGridLines
public IsColor getZeroLineColor()
public void setZeroLineBorderDash(int... zeroLineBorderDash)
zeroLineBorderDash
- length and spacing of dashes of the grid line for the first index (index 0).public List<Integer> getZeroLineBorderDash()
public void setZeroLineBorderDashOffset(int zeroLineBorderDashOffset)
zeroLineBorderDashOffset
- the offset for line dashes of the grid line for the first index (index 0).public int getZeroLineBorderDashOffset()
getZeroLineBorderDashOffset
in interface IsDefaultGridLines
public void setOffsetGridLines(boolean offsetGridLines)
true
, grid lines will be shifted to be between labels. This is set to true
in the bar chart
by default.offsetGridLines
- if true
, grid lines will be shifted to be between labels.public boolean isOffsetGridLines()
true
, grid lines will be shifted to be between labels. This is set to true
in the bar chart
by default.isOffsetGridLines
in interface IsDefaultGridLines
true
, grid lines will be shifted to be between labels.