public final class GridLines extends NativeObjectContainer implements IsDefaultGridLines
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAndAddToParent()
Called recursively when a property has been set in the item.
This is mandatory because it could happen that the parent item is not present, therefore it must be added. |
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".
|
protected Key |
getChildKey()
Returns the property name to use to add this element to its parent.
|
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.
|
protected D |
getDefaultValues()
Returns the default provider instance.
|
List<Integer> |
getLinesWidth()
Returns the stroke widths of grid lines.
|
int |
getLineWidth()
Returns the stroke width of grid lines.
|
protected P |
getParent()
Returns the parent element.
|
int |
getTickMarkLength()
Returns the length in pixels that the grid lines will draw into the axis area.
|
int |
getZ()
Returns z-index of gridline layer.
|
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".
|
protected void |
setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for callbacks) to a model at the specific key.
|
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. |
protected void |
setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for events) to a model at the specific key.
|
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 |
setZ(int z)
Sets z-index of gridline layer.
|
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).
|
checkValue, empty, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, 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, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBorderDashOffsetpublic 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 IsDefaultGridLinesfalse, 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 IsDefaultGridLinestrue, 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 IsDefaultGridLinespublic List<String> getColorsAsString()
public List<IsColor> getColor()
public void setLineWidth(int... lineWidth)
lineWidth - stroke widths of grid lines.public int getLineWidth()
getLineWidth in interface IsDefaultGridLinespublic 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 IsDefaultGridLinestrue, 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 IsDefaultGridLinestrue, 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 IsDefaultGridLinestrue, 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 IsDefaultGridLinespublic void setZeroLineWidth(int zeroLineWidth)
zeroLineWidth - Stroke width of the grid line for the first index (index 0).public int getZeroLineWidth()
getZeroLineWidth in interface IsDefaultGridLinespublic 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 IsDefaultGridLinespublic 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 IsDefaultGridLinespublic 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 IsDefaultGridLinestrue, grid lines will be shifted to be between labels.public void setZ(int z)
z - z-index of gridline layer. Values less than or equals to 0 are drawn under datasets, greater than 0 on top.public int getZ()
getZ in interface IsDefaultGridLinespublic final void setBorderDash(int... borderDash)
borderDash - the line dash pattern used when stroking linespublic final List<Integer> getBorderDash()
public final void setBorderDashOffset(int borderDashOffset)
borderDashOffset - Offset for line dashes.public final int getBorderDashOffset()
protected final Key getChildKey()
null if is a root element.protected final P getParent()
null if is a root element.protected final D getDefaultValues()
protected final void setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
model - element where adding the function proxykey - property name to use to add the function proxyproxy - the function proxy instance to addprotected final void setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
model - element where adding the function proxykey - property name to use to add the function proxyproxy - the function proxy instance to addprotected final void checkAndAddToParent()