Interface IsDefaultTicks
-
- All Superinterfaces:
IsDefaultFontContainer
- All Known Implementing Classes:
DefaultChartTicks,DefaultTicks,Ticks
public interface IsDefaultTicks extends IsDefaultFontContainer
Interface to define ticks object defaults.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TickAligngetAlign()Returns the tick alignment along the axis.intgetAutoSkipPadding()Returns the padding between the ticks on the horizontal axis when autoSkip is enabled.StringgetBackdropColorAsString()Returns the color of label backdrops.IsDefaultPaddinggetBackdropPadding()Returns the padding of label backdrop.intgetCount()Returns the number of ticks to generate.
If specified, this overrides the automatic generation.CrossAligngetCrossAlign()Returns the tick alignment perpendicular to the axis.intgetLabelOffset()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.IsDefaultMajorgetMajor()Returns the major tick defaults.intgetMaxRotation()Returns the maximum rotation for tick labels when rotating to condense labels.intgetMaxTicksLimit()Returns the maximum number of ticks and grid to show.intgetMinRotation()Returns the minimum rotation for tick labels.IsDefaultNumberFormatOptionsgetNumberFormat()Returns the number formatting options.intgetPadding()Returns the padding between the tick label and the axis.intgetPrecision()If defined and stepSize is not specified, the step size will be rounded to this many decimal places.intgetSampleSize()Returns the number of ticks to examine when deciding how many labels will fit.
Setting a smaller value will be faster, but may be less accurate when there is large variability in label length.TickSourcegetSource()Returns the property controls the ticks generation.doublegetStepSize()Returns the user defined fixed step size for the scale.StringgetTextStrokeColorAsString()Returns the text stroke color as string.intgetTextStrokeWidth()Returns the text stroke width.intgetZ()Returns z-index of tick layer.booleanisAutoSkip()If true, automatically calculates how many labels that can be shown and hides labels accordingly.booleanisDisplay()If true, show tick marksbooleanisIncludeBounds()Iftrue, the defined minimum and maximum values should be presented as ticks even if they are not "nice".booleanisMirror()Returns the flips tick labels around axis, displaying the labels inside the chart instead of outside.booleanisShowLabelBackdrop()If true, draw a background behind the tick labels.-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultFontContainer
getColorAsString, getFont
-
-
-
-
Method Detail
-
getMajor
IsDefaultMajor getMajor()
Returns the major tick defaults.- Returns:
- the major tick defaults.
-
getNumberFormat
IsDefaultNumberFormatOptions getNumberFormat()
Returns the number formatting options.- Returns:
- the number formatting options
-
isDisplay
boolean isDisplay()
If true, show tick marks- Returns:
- if true, show tick marks.
-
isAutoSkip
boolean isAutoSkip()
If true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it off to show all labels no matter what- Returns:
- If true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it off to show all labels no matter what.
-
getAutoSkipPadding
int getAutoSkipPadding()
Returns the padding between the ticks on the horizontal axis when autoSkip is enabled. Note: Only applicable to horizontal scales.- Returns:
- padding between the ticks on the horizontal axis when autoSkip is enabled. Note: Only applicable to horizontal scales.
-
isIncludeBounds
boolean isIncludeBounds()
Iftrue, the defined minimum and maximum values should be presented as ticks even if they are not "nice".- Returns:
- if
true, the defined min and maximum values should be presented as ticks even if they are not "nice"
-
getLabelOffset
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.- 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).
-
getCount
int getCount()
Returns the number of ticks to generate.
If specified, this overrides the automatic generation.- Returns:
- the number of ticks to generate.
If specified, this overrides the automatic generation
-
getMaxRotation
int getMaxRotation()
Returns the maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. Note: Only applicable to horizontal scales.- Returns:
- maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. Note: Only applicable to horizontal scales.
-
getMinRotation
int getMinRotation()
Returns the minimum rotation for tick labels. Note: Only applicable to horizontal scales.- Returns:
- minimum rotation for tick labels. Note: Only applicable to horizontal scales.
-
isMirror
boolean isMirror()
Returns the flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales.- Returns:
- flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales.
-
getPadding
int getPadding()
Returns the 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.- Returns:
- 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.
-
getMaxTicksLimit
int getMaxTicksLimit()
Returns the maximum number of ticks and grid to show.- Returns:
- maximum number of ticks and grid to show.
-
getStepSize
double getStepSize()
Returns the user defined fixed step size for the scale.- Returns:
- user defined fixed step size for the scale.
-
getBackdropColorAsString
String getBackdropColorAsString()
Returns the color of label backdrops.- Returns:
- color of label backdrops.
-
getBackdropPadding
IsDefaultPadding getBackdropPadding()
Returns the padding of label backdrop.- Returns:
- padding of label backdrop.
-
isShowLabelBackdrop
boolean isShowLabelBackdrop()
If true, draw a background behind the tick labels.- Returns:
- if true, draw a background behind the tick labels.
-
getSource
TickSource getSource()
Returns the property controls the ticks generation.- Returns:
- property controls the ticks generation.
-
getPrecision
int getPrecision()
If defined and stepSize is not specified, the step size will be rounded to this many decimal places.- Returns:
- if defined and stepSize is not specified, the step size will be rounded to this many decimal places.
-
getZ
int getZ()
Returns z-index of tick layer. Useful when ticks are drawn on chart area.
Values less than or equals to 0 are drawn under datasets, greater than 0 on top.- Returns:
- z-index of tick layer. Useful when ticks are drawn on chart area.
Values less than or equals to 0 are drawn under datasets, greater than 0 on top.
-
getSampleSize
int getSampleSize()
Returns the number of ticks to examine when deciding how many labels will fit.
Setting a smaller value will be faster, but may be less accurate when there is large variability in label length.- Returns:
- the number of ticks to examine when deciding how many labels will fit.
-
getAlign
TickAlign getAlign()
Returns the tick alignment along the axis.- Returns:
- the tick alignment along the axis
-
getCrossAlign
CrossAlign getCrossAlign()
Returns the tick alignment perpendicular to the axis.- Returns:
- the tick alignment perpendicular to the axis
-
getTextStrokeColorAsString
String getTextStrokeColorAsString()
Returns the text stroke color as string.- Returns:
- the text stroke color as string.
-
getTextStrokeWidth
int getTextStrokeWidth()
Returns the text stroke width.- Returns:
- the text stroke width.
-
-