public final class Ticks extends AbstractTick<Scale,IsDefaultTicks> implements IsDefaultTicks
| Modifier and Type | Method and Description |
|---|---|
int |
getAutoSkipPadding()
Returns the padding between the ticks on the horizontal axis when autoSkip is enabled.
|
IsColor |
getBackdropColor()
Returns the color of label backdrops.
|
String |
getBackdropColorAsString()
Returns the color of label backdrops.
|
int |
getBackdropPaddingX()
Returns the horizontal padding of label backdrop.
|
int |
getBackdropPaddingY()
Returns the vertical padding of label backdrop.
|
int |
getLabelOffset()
Returns the distance in pixels to offset the label from the center point of the tick (in the y direction for the x axis,
and the x direction for the y axis).
Note: this can cause labels at the edges to be cropped by the edge of the canvas. |
List<String> |
getLabels()
Returns the array of labels to display.
|
TickMajor |
getMajor()
Returns the major element.
|
double |
getMax()
Returns the user defined maximum number for the scale, overrides maximum value from data.
|
String |
getMaxAsString()
Returns the user defined maximum number for the scale, overrides maximum value from data.
|
int |
getMaxRotation()
Returns the maximum rotation for tick labels when rotating to condense labels.
|
int |
getMaxTicksLimit()
Returns the maximum number of ticks and gridlines to show.
|
double |
getMin()
Returns the user defined minimum number for the scale, overrides minimum value from data.
|
String |
getMinAsString()
Returns the user defined minimum number for the scale, overrides minimum value from data.
|
TickMinor |
getMinor()
Returns the minor tick element.
|
int |
getMinRotation()
Returns the minimum rotation for tick labels.
|
int |
getPadding()
Returns the padding between the tick label and the axis.
|
int |
getPrecision()
If defined and stepSize is not specified, the step size will be rounded to this many decimal places.
|
TickSource |
getSource()
Returns the property controls the ticks generation.
|
double |
getStepSize()
Returns the user defined fixed step size for the scale.
|
double |
getSuggestedMax()
Returns the adjustment used when calculating the maximum data value.
|
double |
getSuggestedMin()
Returns the adjustment used when calculating the minimum data value.
|
boolean |
isAutoSkip()
If
true, automatically calculates how many labels that can be shown and hides labels accordingly. |
boolean |
isBeginAtZero()
If
true, scale will include 0 if it is not already included. |
boolean |
isDisplay()
If
true, show tick marks. |
boolean |
isMirror()
Returns the flips tick labels around axis, displaying the labels inside the chart instead of outside.
|
boolean |
isReverse()
Returns the reverses order of tick labels.
|
boolean |
isShowLabelBackdrop()
If
true, draw a background behind the tick labels. |
void |
setAutoSkip(boolean autoSkip)
If
true, automatically calculates how many labels that can be shown and hides labels accordingly. |
void |
setAutoSkipPadding(int autoSkipPadding)
Sets the padding between the ticks on the horizontal axis when autoSkip is enabled.
|
void |
setBackdropColor(IsColor backdropColor)
Sets the color of label backdrops.
|
void |
setBackdropColor(String backdropColor)
Sets the color of label backdrops.
|
void |
setBackdropPaddingX(int backdropPaddingX)
Sets the horizontal padding of label backdrop.
|
void |
setBackdropPaddingY(int backdropPaddingY)
Sets the vertical padding of label backdrop.
|
void |
setBeginAtZero(boolean beginAtZero)
If
true, scale will include 0 if it is not already included. |
void |
setDisplay(boolean display)
If
true, show tick marks. |
void |
setLabelOffset(int labelOffset)
Sets the distance in pixels to offset the label from the center point of the tick (in the y direction for the x axis, and
the x direction for the y axis).
Note: this can cause labels at the edges to be cropped by the edge of the canvas. |
void |
setLabels(List<String> labels)
Sets an array of labels to display.
|
void |
setLabels(String... labels)
Sets an array of labels to display.
|
void |
setMax(double max)
Sets the user defined maximum number for the scale, overrides maximum value from data.
|
void |
setMax(String max)
Sets the user defined maximum number for the scale, overrides maximum value from data.
|
void |
setMaxRotation(int maxRotation)
Sets the maximum rotation for tick labels when rotating to condense labels.
|
void |
setMaxTicksLimit(int maxTicksLimit)
Sets the maximum number of ticks and gridlines to show.
|
void |
setMin(double min)
Sets the user defined minimum number for the scale, overrides minimum value from data.
|
void |
setMin(String min)
Sets the user defined minimum number for the scale, overrides minimum value from data.
|
void |
setMinRotation(int minRotation)
Sets the minimum rotation for tick labels.
|
void |
setMirror(boolean mirror)
Sets the flips tick labels around axis, displaying the labels inside the chart instead of outside.
|
void |
setPadding(int padding)
Sets the padding between the tick label and the axis.
|
void |
setPrecision(int precision)
If defined and stepSize is not specified, the step size will be rounded to this many decimal places.
|
void |
setReverse(boolean reverse)
Sets the reverses order of tick labels.
|
void |
setShowLabelBackdrop(boolean showLabelBackdrop)
If
true, draw a background behind the tick labels. |
void |
setSource(TickSource source)
Sets the property controls the ticks generation.
|
void |
setStepSize(double stepSize)
Sets the user defined fixed step size for the scale.
|
void |
setSuggestedMax(double suggestedMax)
Sets the adjustment used when calculating the maximum data value.
|
void |
setSuggestedMin(double suggestedMin)
Sets the adjustment used when calculating the minimum data value.
|
getFontColor, getFontColorAsString, getFontFamily, getFontSize, getFontStyle, setFontColor, setFontColor, setFontFamily, setFontSize, setFontStylecheckAndAddToParent, getChildKey, getDefaultValues, getParent, setCallbackToModel, setEventToModelgetArrayValue, 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, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFontColorAsString, getFontFamily, getFontSize, getFontStylepublic final TickMinor getMinor()
getMinor in interface IsDefaultTickspublic final TickMajor getMajor()
getMajor in interface IsDefaultTickspublic void setBeginAtZero(boolean beginAtZero)
true, scale will include 0 if it is not already included.beginAtZero - if true, scale will include 0 if it is not already included.public boolean isBeginAtZero()
true, scale will include 0 if it is not already included.isBeginAtZero in interface IsDefaultTickstrue, scale will include 0 if it is not already included.public void setDisplay(boolean display)
true, show tick marks.display - if true, show tick marks.public boolean isDisplay()
true, show tick marks.isDisplay in interface IsDefaultTickstrue, show tick marks.public void setReverse(boolean reverse)
reverse - reverses order of tick labels.public boolean isReverse()
isReverse in interface IsDefaultTickstrue reverses order of tick labels.public void setAutoSkip(boolean autoSkip)
true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it
off to show all labels no matter whatautoSkip - if true, automatically calculates how many labels that can be shown and hides labels
accordingly. Turn it off to show all labels no matter whatpublic boolean isAutoSkip()
true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it
off to show all labels no matter whatisAutoSkip in interface IsDefaultTickstrue, automatically calculates how many labels that can be shown and hides labels accordingly.
Turn it off to show all labels no matter what.public void setAutoSkipPadding(int autoSkipPadding)
autoSkipPadding - padding between the ticks on the horizontal axis when autoSkip is enabled. Note: Only applicable
to horizontal scales.public int getAutoSkipPadding()
getAutoSkipPadding in interface IsDefaultTickspublic void setLabelOffset(int labelOffset)
labelOffset - the distance in pixels to offset the label from the center point of the tick (in the y direction for
the x axis, and the x direction for the y axis)public int getLabelOffset()
getLabelOffset in interface IsDefaultTickspublic void setMaxRotation(int maxRotation)
maxRotation - maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until
necessary. Note: Only applicable to horizontal scales.public int getMaxRotation()
getMaxRotation in interface IsDefaultTickspublic void setMinRotation(int minRotation)
minRotation - minimum rotation for tick labels. Note: Only applicable to horizontal scales.public int getMinRotation()
getMinRotation in interface IsDefaultTickspublic void setMirror(boolean mirror)
mirror - flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only
applicable to vertical scales.public boolean isMirror()
isMirror in interface IsDefaultTickspublic void setPadding(int padding)
padding - padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal
(X) direction. When set on a horizontal axis, this applies in the vertical (Y) direction.public int getPadding()
getPadding in interface IsDefaultTickspublic void setMin(double min)
min - the user defined minimum number for the scale, overrides minimum value from data.public double getMin()
getMin in interface IsDefaultTickspublic void setMax(double max)
max - user defined maximum number for the scale, overrides maximum value from data.public double getMax()
getMax in interface IsDefaultTickspublic void setMin(String min)
min - the user defined minimum number for the scale, overrides minimum value from data.public String getMinAsString()
public void setMax(String max)
max - user defined maximum number for the scale, overrides maximum value from data.public String getMaxAsString()
public void setMaxTicksLimit(int maxTicksLimit)
maxTicksLimit - maximum number of ticks and gridlines to show.public int getMaxTicksLimit()
getMaxTicksLimit in interface IsDefaultTickspublic void setStepSize(double stepSize)
stepSize - user defined fixed step size for the scale.public double getStepSize()
getStepSize in interface IsDefaultTickspublic void setSuggestedMax(double suggestedMax)
suggestedMax - adjustment used when calculating the maximum data value.public double getSuggestedMax()
getSuggestedMax in interface IsDefaultTickspublic void setSuggestedMin(double suggestedMin)
suggestedMin - adjustment used when calculating the minimum data value.public double getSuggestedMin()
getSuggestedMin in interface IsDefaultTickspublic void setBackdropColor(IsColor backdropColor)
backdropColor - color of label backdrops.public void setBackdropColor(String backdropColor)
backdropColor - color of label backdrops.public String getBackdropColorAsString()
getBackdropColorAsString in interface IsDefaultTickspublic IsColor getBackdropColor()
public void setBackdropPaddingX(int backdropPaddingX)
backdropPaddingX - horizontal padding of label backdrop.public int getBackdropPaddingX()
getBackdropPaddingX in interface IsDefaultTickspublic void setBackdropPaddingY(int backdropPaddingY)
backdropPaddingY - vertical padding of label backdrop.public int getBackdropPaddingY()
getBackdropPaddingY in interface IsDefaultTickspublic void setShowLabelBackdrop(boolean showLabelBackdrop)
true, draw a background behind the tick labels.showLabelBackdrop - if true, draw a background behind the tick labels.public boolean isShowLabelBackdrop()
true, draw a background behind the tick labels.isShowLabelBackdrop in interface IsDefaultTickstrue, draw a background behind the tick labels.public void setLabels(String... labels)
labels - An array of labels to display.public void setLabels(List<String> labels)
labels - A list of labels to display.public List<String> getLabels()
public void setSource(TickSource source)
source - property controls the ticks generation.public TickSource getSource()
getSource in interface IsDefaultTickspublic void setPrecision(int precision)
precision - if defined and stepSize is not specified, the step size will be rounded to this many decimal places.public int getPrecision()
getPrecision in interface IsDefaultTicks