public final class Ticks extends FontItem
| 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.
|
java.lang.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 centre 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. |
FontItem |
getMajor() |
double |
getMax()
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.
|
FontItem |
getMinor() |
int |
getMinRotation()
Returns the minimum rotation for tick labels.
|
int |
getPadding()
Returns the padding between the tick label and the axis.
|
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(java.lang.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 centre 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 |
setMax(double 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 |
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 |
setReverse(boolean reverse)
Sets the reverses order of tick labels.
|
void |
setShowLabelBackdrop(boolean showLabelBackdrop)
If true, draw a background behind the tick labels.
|
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, hasPropertycheckAndGetDoubleValues, checkAndGetEnumValues, checkAndGetIntegerValues, checkAndGetStringValues, checkAndSetDoubleValues, checkAndSetEnumValues, checkAndSetIntegerValues, checkAndSetStringValues, getDoubleArray, getIntegerArray, getJavaScriptObject, getObjectArray, getStringArray, getValue, getValue, getValue, getValue, getValue, getValue, getValue, has, has, hasToBeRegistered, isEmpty, keys, remove, remove, removeIfExists, setDoubleArray, setEnumValueArray, setIntegerArray, setObjectArray, setStringArray, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, typepublic FontItem getMinor()
public FontItem getMajor()
public void setBeginAtZero(boolean beginAtZero)
beginAtZero - if true, scale will include 0 if it is not already included.public boolean isBeginAtZero()
public void setDisplay(boolean display)
display - if true, show tick markspublic boolean isDisplay()
public void setReverse(boolean reverse)
reverse - reverses order of tick labels.public boolean isReverse()
public void setAutoSkip(boolean autoSkip)
autoSkip - 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()
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()
public void setLabelOffset(int labelOffset)
labelOffset - the distance in pixels to offset the label from the centre point of the tick (in the y direction for
the x axis, and the x direction for the y axis)public int getLabelOffset()
public 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()
public void setMinRotation(int minRotation)
minRotation - minimum rotation for tick labels. Note: Only applicable to horizontal scales.public int getMinRotation()
public 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()
public 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()
public void setMin(double min)
min - the user defined minimum number for the scale, overrides minimum value from data.public double getMin()
public void setMax(double max)
max - user defined maximum number for the scale, overrides maximum value from data.public double getMax()
public void setMaxTicksLimit(int maxTicksLimit)
maxTicksLimit - maximum number of ticks and gridlines to show.public int getMaxTicksLimit()
public void setStepSize(double stepSize)
stepSize - user defined fixed step size for the scale.public double getStepSize()
public void setSuggestedMax(double suggestedMax)
suggestedMax - adjustment used when calculating the maximum data value.public double getSuggestedMax()
public void setSuggestedMin(double suggestedMin)
suggestedMin - adjustment used when calculating the minimum data value.public double getSuggestedMin()
public void setBackdropColor(IsColor backdropColor)
backdropColor - color of label backdrops.public void setBackdropColor(java.lang.String backdropColor)
backdropColor - color of label backdrops.public java.lang.String getBackdropColorAsString()
public IsColor getBackdropColor()
public void setBackdropPaddingX(int backdropPaddingX)
backdropPaddingX - horizontal padding of label backdrop.public int getBackdropPaddingX()
public void setBackdropPaddingY(int backdropPaddingY)
backdropPaddingY - vertical padding of label backdrop.public int getBackdropPaddingY()
public void setShowLabelBackdrop(boolean showLabelBackdrop)
showLabelBackdrop - if true, draw a background behind the tick labels.public boolean isShowLabelBackdrop()