public final class Grid extends AbstractModel<AbstractScale,D> implements IsDefaultGrid
Modifier and Type | Method and Description |
---|---|
IsColor |
getBorderColor()
If set, used as the color of the border line.
If unset, the first color option is resolved and used. |
String |
getBorderColorAsString()
If set, used as the color of the border line.
If unset, the first color option is resolved and used. |
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.
|
double |
getBorderDashOffset()
Returns the line dash pattern offset.
|
int |
getBorderWidth()
If set, used as the width of the border line.
|
List<IsColor> |
getColor()
Returns the colors of the grid.
If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on. |
String |
getColorAsString()
Returns the color of the grid, if not specified as an array.
|
List<String> |
getColorsAsString()
Returns the colors of the grid.
If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on. |
List<Integer> |
getLinesWidth()
Returns the stroke widths of grid.
|
int |
getLineWidth()
Returns the stroke width of grid.
The first element if set as array. |
List<Integer> |
getTickBorderDash()
Returns the length and spacing of the tick mark line.
|
double |
getTickBorderDashOffset()
Returns the offset for the line dash of the tick mark.
|
List<IsColor> |
getTickColor()
The color of the grid.
If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on. |
String |
getTickColorAsString()
Returns the color of the tick line.
|
List<String> |
getTickColorsAsString()
The color of the grid.
If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on. |
int |
getTickLength()
Returns the length in pixels that the grid will draw in the the axis area.
|
List<Integer> |
getTicksWidth()
Returns the width of the tick marks in pixels.
|
int |
getTickWidth()
Returns the width of the tick mark in pixels.
The first element if set as array. |
int |
getZ()
Returns z-index of grid line layer.
Values less than or equals to 0 are drawn under datasets, greater than 0 on top. |
boolean |
isCircular()
If
true , grid are circular (on radar chart only). |
boolean |
isDisplay()
If
false , do not display grid 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 |
isOffset()
If
true , grid will be shifted to be between labels.This is set to true in the bar chart by default. |
void |
setBorderColor(IsColor color)
If set, used as the color of the border line.
If unset, the first color option is resolved and used. |
void |
setBorderColor(String color)
If set, used as the color of the border line.
If unset, the first color option is resolved and used. |
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(double borderDashOffset)
Sets the line dash pattern offset.
|
void |
setBorderWidth(int borderWidth)
If set, used as the width of the border line.
|
void |
setCircular(boolean circular)
If
true , grid are circular (on radar chart only). |
void |
setColor(IsColor... color)
Sets the color of the grid.
If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on. |
void |
setColor(String... color)
Sets the color of the grid.
If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on. |
void |
setDisplay(boolean display)
If
false , do not display grid 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.
|
void |
setOffset(boolean offset)
If
true , grid will be shifted to be between labels.This is set to true in the bar chart by default. |
void |
setTickBorderDash(int tickBorderDash)
Sets the length and spacing of the tick mark line.
|
void |
setTickBorderDashOffset(double tickBorderDashOffset)
Sets the offset for the line dash of the tick mark.
|
void |
setTickColor(IsColor... color)
Sets the color of the tick line.
|
void |
setTickColor(String... color)
Sets the color of the tick line.
|
void |
setTickLength(int tickLength)
Sets the length in pixels that the grid will draw in the the axis area.
|
void |
setTickWidth(int... tickWidth)
Sets the width of the tick marks in pixels.
|
void |
setZ(int z)
Sets z-index of gridline layer.
Values less than or equals to 0 are drawn under datasets, greater than 0 on top. |
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBorderDash, getBorderDashOffset
public void setDisplay(boolean display)
false
, do not display grid for this axis.display
- If false
, do not display grid for this axis.public boolean isDisplay()
false
, do not display grid for this axis.isDisplay
in interface IsDefaultGrid
false
, do not display grid for this axis.public void setCircular(boolean circular)
true
, grid are circular (on radar chart only).circular
- If true
, grid are circular (on radar chart only).public boolean isCircular()
true
, grid are circular (on radar chart only).isCircular
in interface IsDefaultGrid
true
, grid are circular (on radar chart only).public void setBorderColor(IsColor color)
color
- if set, used as the color of the border line.public void setBorderColor(String color)
color
- if set, used as the color of the border line.public String getBorderColorAsString()
getBorderColorAsString
in interface IsDefaultGrid
public IsColor getBorderColor()
public void setColor(IsColor... color)
color
- The color of the grid.public void setColor(String... color)
color
- The color of the grid.public String getColorAsString()
getColorAsString
in interface IsDefaultScaleLines
public List<String> getColorsAsString()
public List<IsColor> getColor()
public void setBorderWidth(int borderWidth)
borderWidth
- if set, used as the width of the border line. If unset, the first lineWidth option is resolved and used.public int getBorderWidth()
getBorderWidth
in interface IsDefaultGrid
public void setLineWidth(int... lineWidth)
lineWidth
- stroke widths of grid.public int getLineWidth()
getLineWidth
in interface IsDefaultScaleLines
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 IsDefaultGrid
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 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 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 are drawn.isDrawOnChartArea
in interface IsDefaultGrid
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 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 IsDefaultGrid
true
, draw lines beside the ticks in the axis area beside the chart.public void setTickLength(int tickLength)
tickLength
- Length in pixels that the grid will draw in the the axis area.public int getTickLength()
getTickLength
in interface IsDefaultGrid
public void setOffset(boolean offset)
true
, grid will be shifted to be between labels.true
in the bar chart by default.offset
- if true
, grid will be shifted to be between labels.public boolean isOffset()
true
, grid will be shifted to be between labels.true
in the bar chart by default.isOffset
in interface IsDefaultGrid
true
, grid will be shifted to be between labels.public void setZ(int z)
z
- z-index of gridline layer.public int getZ()
getZ
in interface IsDefaultGrid
public void setTickBorderDash(int tickBorderDash)
tickBorderDash
- the length and spacing of the tick mark line.public List<Integer> getTickBorderDash()
public final void setTickBorderDashOffset(double tickBorderDashOffset)
tickBorderDashOffset
- the offset for the line dash of the tick markpublic final double getTickBorderDashOffset()
getTickBorderDashOffset
in interface IsDefaultGrid
public void setTickColor(IsColor... color)
color
- the color of the tick line.public void setTickColor(String... color)
color
- the color of the tick line.public String getTickColorAsString()
getTickColorAsString
in interface IsDefaultGrid
public List<String> getTickColorsAsString()
public List<IsColor> getTickColor()
public void setTickWidth(int... tickWidth)
tickWidth
- the width of the tick mark in pixelspublic int getTickWidth()
getTickWidth
in interface IsDefaultGrid
public List<Integer> getTicksWidth()
public final void setBorderDash(int... borderDash)
borderDash
- the line dash pattern used when stroking linespublic final List<Integer> getBorderDash()
getBorderDash
in interface IsDefaultScaleLines
public final void setBorderDashOffset(double borderDashOffset)
borderDashOffset
- Offset for line dashes.public final double getBorderDashOffset()
getBorderDashOffset
in interface IsDefaultScaleLines