Class CartesianTicks
java.lang.Object
org.primefaces.model.charts.axes.cartesian.CartesianTicks
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CartesianCategoryTicks,CartesianLinearTicks
Common ticks options for cartesian types
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()Write the common ticks optionsGets the autoSkipPaddingGets the labelOffsetGets the maxRotationGets the minRotationGets the paddingbooleanGets the autoSkipbooleanisMirror()Gets the mirrorvoidsetAutoSkip(boolean autoSkip) Sets the autoSkipvoidsetAutoSkipPadding(Number autoSkipPadding) Sets the autoSkipPaddingvoidsetLabelOffset(Number labelOffset) Sets the labelOffsetvoidsetMaxRotation(Number maxRotation) Sets the maxRotationvoidsetMinRotation(Number minRotation) Sets the minRotationvoidsetMirror(boolean mirror) Sets the mirrorvoidsetPadding(Number padding) Sets the padding
-
Constructor Details
-
CartesianTicks
public CartesianTicks()
-
-
Method Details
-
isAutoSkip
public boolean isAutoSkip()Gets the autoSkip- Returns:
- autoSkip
-
setAutoSkip
public void setAutoSkip(boolean autoSkip) Sets the autoSkip- Parameters:
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 what
-
getAutoSkipPadding
Gets the autoSkipPadding- Returns:
- autoSkipPadding
-
setAutoSkipPadding
Sets the autoSkipPadding- Parameters:
autoSkipPadding- Padding between the ticks on the horizontal axis when autoSkip is enabled. Note: Only applicable to horizontal scales.
-
getLabelOffset
Gets the labelOffset- Returns:
- labelOffset
-
setLabelOffset
Sets the labelOffset- Parameters:
labelOffset- 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
-
getMaxRotation
Gets the maxRotation- Returns:
- maxRotation
-
setMaxRotation
Sets the maxRotation- Parameters:
maxRotation- Maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. Note: Only applicable to horizontal scales.
-
getMinRotation
Gets the minRotation- Returns:
- minRotation
-
setMinRotation
Sets the minRotation- Parameters:
minRotation- Minimum rotation for tick labels. Note: Only applicable to horizontal scales.
-
isMirror
public boolean isMirror()Gets the mirror- Returns:
- mirror
-
setMirror
public void setMirror(boolean mirror) Sets the mirror- Parameters:
mirror- Flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales
-
getPadding
Gets the padding- Returns:
- padding
-
setPadding
Sets the padding- Parameters:
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.
-
encode
Write the common ticks options- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-